同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 10 Graphical User Interface

Graphical User Interface(1/60) Introduction > MatLab provides Graphical User Interface Development Environment(GUIDE) > Components-- Graphical Components: pushbuttons,edit boxes,sliders,labels,menus,.. Static Components: frames,text strings,... > Callbacks-- The functions which perform the required action when a component is pushed 翻日济大学 AW TONGJI UNIVERSITY
➢ MatLab provides Graphical User Interface Development Environment(GUIDE) ➢ Components -- Graphical Components: pushbuttons, edit boxes, sliders, labels, menus, … Static Components: frames, text strings,… ➢ Callbacks-- The functions which perform the required action when a component is pushed Graphical User Interface(1/60) Introduction

Graphical User Interface(2/60) Guide Guide is an interactive tool for designing and building Graphical User Interfaces (GUD)for your Matlab applications. > GUI building process involves: Designing of the user interface and layout (The looks!) Programming of the GUI and its components (The works! Testing,debugging and finally running it. PHAW @月停大学 TONGJI UNIVERSITY
➢ Guide is an interactive tool for designing and building Graphical User Interfaces (GUI) for your Matlab applications. ➢ GUI building process involves: • Designing of the user interface and layout ( The looks!) • Programming of the GUI and its components (The works!) • Testing, debugging and finally running it. Graphical User Interface(2/60) Guide

Graphical User Interface(3/60) Guide > Either click on the Guide Icon on the Matlab-Toolbar or type guide on the command window. > This will open the Quickstart GUI template selection window. Matlab provides a few templates to help with the common GUI design task but these are limited in numbers and you will probably need to start with a blank template. > The initial layout area is usually resizable by clicking and dragging the handles on the corners of the template area. PHAW @日济大学 TONGJI UNIVERSITY
➢ Either click on the Guide Icon on the Matlab-Toolbar or type guide on the command window. ➢ This will open the Quickstart GUI template selection window. Matlab provides a few templates to help with the common GUI design task but these are limited in numbers and you will probably need to start with a blank template. ➢ The initial layout area is usually resizable by clicking and dragging the handles on the corners of the template area. Graphical User Interface(3/60) Guide

Graphical User Interface(4/60) Guide Alignment tool Menu Editor M-file editor Property RUN Inspector ☒untit1ed.ti 四▣☒ layout area x CDHAW @月协大学 TONGJI UNIVERSITY
Graphical User Interface(4/60) Guide Alignment tool Menu Editor M-file editor Property Inspector RUN layout area

Graphical User Interface(5/60) Guide The Guide window contains the components palette.Your layout-design task will involve dragging and dropping the GUI control components from the palette onto the layout area. > File->Preferences option of the GUIDE window will allow you to display the names of the items in the components palette via the Guide:Preferences Show Names in the components palette. @日济大学 AW TONGJI UNIVERSITY
➢ The Guide window contains the components palette. Your layout-design task will involve dragging and dropping the GUI control components from the palette onto the layout area. ➢ File-> Preferences option of the GUIDE window will allow you to display the names of the items in the components palette via the Guide: Preferences > Show Names in the components palette. Graphical User Interface(5/60) Guide

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
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 09 Probability and statistics.ppt
- 同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 08 Advanced Mathematics.ppt
- 同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 07 Sparse Arrays, Cell Arrays, and Structures.ppt
- 同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 06 User-defined Functions.ppt
- 同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 05 Plotting.ppt
- 同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 04 Branches and Loops.ppt
- 同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 03Top-down and bottom-up design.ppt
- 同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 02 MATLAB Basics(负责人:陈明).ppt
- 同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 01 MATLAB Programming for Mechanical Engineering(Introduction to MATLAB).ppt
- 同济大学:《Matlab在机械设计中的应用》课程教学资源(试卷习题)Final Examination(B)The First Semester(2013-2014).pdf
- 同济大学:《Matlab在机械设计中的应用》课程教学资源(试卷习题)Final Examination(A)The First Semester(2013-2014).pdf
- 运城学院:《机械原理》课程教学资源(课件讲稿)第6章 齿轮.pdf
- 运城学院:《机械原理》课程教学资源(课件讲稿)第2章 平面机构的结构分析.pdf
- 运城学院:《机械原理》课程教学资源(课件讲稿)第8章 其他常见机构.pdf
- 运城学院:《机械原理》课程教学资源(课件讲稿)第9章 机械中的摩擦与效率.pdf
- 运城学院:《机械原理》课程教学资源(课件讲稿)第5章 凸轮机构.pdf
- 运城学院:《机械原理》课程教学资源(课件讲稿)第10章 机械的平衡.pdf
- 运城学院:《机械原理》课程教学资源(课件讲稿)第7章 轮系(Gear Train).pdf
- 运城学院:《机械原理》课程教学资源(课件讲稿)第3章 平面机构的运动分析(Kinematic Analysis).pdf
- 运城学院:《机械原理》课程教学资源(课件讲稿)第4章 平面四杆机构.pdf
- 同济大学:《Matlab在机械设计中的应用》课程电子教案(PPT课件)Chapter 11 Simulink.pptx
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第一章 内燃机工作原理及总体构造 The Working Principles and Overall Structure of Internal Combustion Engines.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第二章 机体组及曲柄连杆机构 Engine Block, Crank and Connecting Rod Mechanism.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第三章 配气机构 Valve Trains(负责人:李理光).pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第四章 汽油机燃油供给系统 Fuel Supply System For Gasoline Engine.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第六章 进气、排气及增压系统 Intake, Exhaust and Boost Systems.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第五章 柴油机燃油供给系统 Fuel Supply System for Diesel Engines.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第七章 发动机冷却系 Cooling System.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第九章 起动系统 Starting System.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第八章 发动机润滑系 Lubrication System for Automotive Engines.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第十章 发动机点火系统 Engine Ignition System.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)第十二章 发动机有害排放物的控制系统 Control System of Harmful Emissions in Engine Exhaust.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)Automobile structure(Types of modern automobiles).pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)Chapter 13 传动系统 Overview of automobile drivetrain.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)Chapter 14 离合器 Clutch.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)Chapter 15 变速箱 Transmission and transfer case.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)Chapter 16 自动变速器 Vehicle Automatic transmission.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)Chapter 17 传动装置 Universal Gearing.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)Chapter 18 驱动桥 Driving Axle.pdf
- 同济大学:《汽车构造》课程电子教案(课件讲稿)Chapter 19 传动装置 Running Gear.pdf