Graphical User Interface(6/60) Guide Alignment tool Menu Editor M-file editor Property RUN Inspector untitlod.fig 因▣8 D它日出B色个串必▣图哈P Select Push Button Slider Radio Button components ☑Check Box palette Edit Text layout area m Static Text 3 Pop-up Menu 雪到Listbox 画Toggle Button Axes Panel Button Group XActiveX Control @月停大学 TONGJI UNIVERSITY
Graphical User Interface(6/60) Guide Alignment tool Menu Editor M-file editor Property Inspector RUN layout area components palette
Graphical User Interface(7/60) Uicontrol Objects The user interface will usually be made up of: Toolbars&Menus 。 Input Control components such as Push Buttons,Radio Buttons,Check Boxes (SWITCHES) Pop-up Menus,List-Boxes (SELECTIONS) Sliders (CONTINIOUS CONTROL Edit Text (TEXT method of input) ·Graphical Objects Axes Objects Text Objects Static Text @日济大学 AW TONGJI UNIVERSITY
➢ The user interface will usually be made up of : • Toolbars & Menus • Input Control components such as : Push Buttons, Radio Buttons, Check Boxes ( SWITCHES) Pop-up Menus, List-Boxes ( SELECTIONS) Sliders ( CONTINIOUS CONTROL ) Edit Text ( TEXT method of input ) • Graphical Objects Axes Objects • Text Objects Static Text Graphical User Interface(7/60) Uicontrol Objects
Graphical User Interface(8/60) Uicontrol Objects Figure No.1 回☒ Eile Edit Tools Window Help 07 Frame 06 FRAME 0.5 Push Button 04 Push Button Radio Button 0.3 Toggle Button 02 List Box Slider Toggle Button Edit Text 0.1 Pop-up Menu 0 0.1 02 03 0.5 0.6 0.7 Static Text Check. Check Box CRadio Bu Box SLIDER List Box @大学 AW TONGJI UNIVERSITY
Graphical User Interface(8/60) Uicontrol Objects Push Button Frame Toggle Button Pop-up Menu Static Text Slider Edit Text List Box Radio Button Check Box
Graphical User Interface(9/60) Uicontrol Objects > Edit Text Edit Text Used in situations that require the user to enter strings or characters or numbers. A variable.You can call it anything. >>K-get(hObject,'string); Retrieves the 'string' entered by user. If you entered abc'into the Edit Text,then the command above will make K=abc' @日济大学 AW TONGJI UNIVERSITY
➢ Edit Text Used in situations that require the user to enter strings or characters or numbers. >>K=get(hObject,'string'); If you entered ‘abc’ into the Edit Text, then the command above will make K = ‘abc’ Graphical User Interface(9/60) Uicontrol Objects A variable. You can call it anything. Retrieves the ‘string’ entered by user
Graphical User Interface(10/60) Uicontrol Objects At this point,K is a string.If the user enters a number,it will still be a string. To change it to a number: >>K num=str2double(K); To pass the variable K for processing (to another Callback): Another variable.But must be in >>handles.K=K; the format 'handles.anyname' >>guidata(hObject,handles); Standard command line used to @大学 save'all handles information. TONGJI UNIVERSITY
At this point, K is a string. If the user enters a number, it will still be a string. To change it to a number: >>K_num=str2double(K); To pass the variable K for processing (to another Callback): >>handles.K=K; >>guidata(hObject,handles); Graphical User Interface(10/60) Uicontrol Objects Another variable. But must be in the format ‘handles.anyname’ Standard command line used to ‘save’ all handles information