MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manual do Utilizador

Consulte online ou descarregue Manual do Utilizador para Software MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE. Creating Graphical User Interfaces Manual do Utilizador

/ 330
Índice
Creating Graphical User Interfaces
Version 7
M

ATLAB

®
The Language of Technical Computing

Ficheiro PDF · ·

Imprimir

Imprimir documento

Partilha

Resumo do Conteúdo

Página 1 - Version 7

Creating Graphical User Interfaces Version 7 The Language of Technical Computing

Página 2 - How to Contact The MathWorks:

How to Contact The MathWorks: www.mathworks.com Web comp.soft-sys.matlab Newsgroup www.mathworks.com/contact_TS.html Technical support…

Página 3 - Revision History

Revision History November 2000 Online only New for MATLAB 6.0 (Release12) June 2001 Online only Revised for MATLAB 6.1 (Release 12.1) July 2002 Online…

Página 5

v Contents Getting Started About GUIs in MATLAB What Is a GUI? 1-2 How Does a GUI Work? 1-3 Where Do I Start? 1-4 Creating a GUI with GUIDE GUIDE: A…

Página 6

vi Contents Generating Data to Plot 2-19 Programming the Pop-Up Menu 2-21 Programming the Push Buttons 2-23 Running the GUI 2-26 Creating a GUI…

Página 7

vii Creating GUIs with GUIDE What Is GUIDE? 4-2 Laying Out a GUI 4-2 Programming the GUI 4-2 GUIDE Tools Summary 4-3 Preferences and Options GUIDE…

Página 8

viii Contents Selecting a GUI Template 6-5 Accessing the Templates 6-5 Template Descriptions 6-6 Setting the GUI Size 6-12 Adding Components to the…

Página 9 - Saving and Running the GUI

ix Saving and Running the GUI Naming a GUI and Its Files 7-2 The GUI Files 7-2 File and GUI Names 7-3 How to Assign Names 7-3 Renaming GUIs and GUI…

Página 10 - Contents

x Contents Callback Syntax and Arguments 8-11 Naming of Callback Functions 8-11 Changing Callback Names Assigned by GUIDE 8-12 Input Arguments 8-13…

Página 11

xi Examples of GUIDE GUIs GUI with Multiple Axes 10-2 Techniques Used in the Example 10-2 View Completed Layout and Its GUI M-File 10-3 Design of the…

Página 12

xii Contents The Contact Name Callback 10-38 The Contact Phone Number Callback 10-39 Paging Through the Address Book — Prev/Next 10-40 Saving Changes…

Página 13 - Functions for Creating GUIs

xiii Creating GUIs Programmatically Functions for Creating GUIs Introduction 11-2 Function Summary 11-3 Predefined Dialog Boxes 11-3 Creating…

Página 14

xiv Contents Techniques Used in the Example 25 View the Completed GUI M-File 25 Subfunction Summary 26 M-File Structure 27 GUI Programming Techniques…

Página 15 - Getting Started

Getting Started These sections show you how to create a simple graphical user interface (GUI) using GUIDE, the MATLAB ® graphical user interface…

Página 17 - About GUIs in MATLAB

About GUIs in MATLAB What Is a GUI? (p. 1-2) Explains a graphical user interface (GUI) from a GUI user’s perspective. How Does a GUI Work? (p. 1-3)…

Página 18 - 1 About GUIs in MATLAB

1 About GUIs in MATLAB 1-2 What Is a GUI? A graphical user interface (GUI) is a graphical display that contains devices, or components, that enable a…

Página 19 - How Does a GUI Work?

How Does a GUI Work? 1-3 How Does a GUI Work? Each component, and the GUI itself, is associated with one or more user-written routines known as…

Página 20

1 About GUIs in MATLAB 1-4 Where Do I Start? First you have to design your GUI. You have to decide what you want it to do, how you want the user to…

Página 21 - Creating a GUI with

Creating a GUI with GUIDE GUIDE: A Brief Introduction (p. 2-2) Introduces GUIDE, the graphical user interface development environment. The Example…

Página 22 - 2 Creating a GUI with GUIDE

2 Creating a GUI with GUIDE 2-2 GUIDE: A Brief Introduction GUIDE, the MATLAB Graphical User Interface development environment, provides a set of…

Página 23 - The Example: Simple GUI

The Example: Simple GUI 2-3 The Example: Simple GUI This chapter shows you how to use GUIDE to create the example graphical user interface (GUI) which…

Página 24

2 Creating a GUI with GUIDE 2-4 Laying Out a Simple GUI “Opening a New GUI in the Layout Editor” on page 2-4 “Setting the GUI Figure Size” on page 2-6…

Página 25 - OK. The Layout Editor then

Laying Out a Simple GUI 2-5 3 Display the names of the GUI components in the component palette. Select Preferences from the MATLAB File menu. Then…

Página 26

2 Creating a GUI with GUIDE 2-6 Setting the GUI Figure Size Set the size of the GUI by resizing the grid area in the Layout Editor. Click on the…

Página 27 - Adding the Components

Laying Out a Simple GUI 2-7 Adding the Components 1 Add the three push buttons to the GUI. For each push button, select the push button from the…

Página 28

2 Creating a GUI with GUIDE 2-8 2 Add the remaining components to the GUI. A static text A pop-up menu An axes Arrange the components as shown in the…

Página 29 - Aligning the Components

Laying Out a Simple GUI 2-9 Aligning the Components You can use the Alignment Tool to align components with respect to one another, if they have the…

Página 30

2 Creating a GUI with GUIDE 2-10 4 Click OK. Your GUI now looks like this is the Layout Editor.

Mostrar as 330 páginas
Página 31

Laying Out a Simple GUI 2-11 Adding Text to the Components Although the push buttons, pop-up menu, and static text show some text in the Layout…

Página 32

2 Creating a GUI with GUIDE 2-12 2 In the layout area select the top push button by clicking it. 3 In the Property Inspector, select the String…

Página 33 - Entering Pop-Up Menu Items

Laying Out a Simple GUI 2-13 4 The push button label changes to Surf when you click outside the String field. 5 Select each of the remaining push…

Página 34

2 Creating a GUI with GUIDE 2-14 3 Replace the existing text with the names of the three data sets: Peaks, Membrane, and Sinc. Press Enter to move to…

Página 35 - , then click OK

Laying Out a Simple GUI 2-15 2 In the Property Inspector, click the button next to String. In the String dialog box that displays, replace the…

Página 36

2 Creating a GUI with GUIDE 2-16 The Completed Layout In the Layout Editor, your GUI now looks like this and the next step is to save the layout. The…

Página 37 - Saving the GUI Layout

Saving the GUI Layout 2-17 Saving the GUI Layout When you save a GUI, GUIDE creates two files, a FIG-file and an M-file. The FIG-file, with extension…

Página 38

2 Creating a GUI with GUIDE 2-18 working directory to the directory containing the GUI files, or adding that directory to the top or bottom of the…

Página 39

When you saved your GUI in the previous topic, “Saving the GUI Layout” on page 2-17, GUIDE created two files: a FIG-file simple_gui.fig that contains…

Página 40

2 Creating a GUI with GUIDE 2-20 The cursor moves to the opening function which already contains this code: % --- Executes just before simple_gui is…

Página 41 - Programming the Pop-Up Menu

% Create the data to plot. handles.peaks=peaks(35); handles.membrane=membrane; [x,y] = meshgrid(-8:.5:8); r = sqrt(x.^2+y.^2) + eps; sinc = sin(r)./r…

Página 42

2 Creating a GUI with GUIDE 2-22 index of the selected string. The pop-up menu callback reads the pop-up menu Value property to determine what item is…

Página 43 - Programming the Push Buttons

It then uses a switch statement to make the selected data set the current data. The last statement saves the changes to the handles structure. %…

Página 44

2 Creating a GUI with GUIDE 2-24 The GUI M-file opens in the editor if it is not already open, and the cursor moves to the Surf push button callback…

Página 45 - Save from the File menu

% Display contour plot of the currently selected data. contour(handles.current_data); 4 Save the M-file by selecting Save from the File menu. Your GUI…

Página 46

2 Creating a GUI with GUIDE 2-26 Running the GUI In the previous topic, you programmed the pop-up menu and the push buttons. You also created data for…

Página 47

Running the GUI 2-27 3 Try some of the other combinations before closing the GUI.

Página 48

2 Creating a GUI with GUIDE

Página 49 - Creating a GUI

Creating a GUI Programmatically The Example: Simple GUI (p. 3-2) Describes the example to be constructed. Function Summary (p. 3-4) Lists the…

Página 50

3 Creating a GUI Programmatically 3-2 The Example: Simple GUI This chapter shows you how to write a script that creates the example graphical user…

Página 51

The Example: Simple GUI 3-3 Subsequent topics guide you through the process of creating the GUI. This process begins with “Creating a GUI M-File” on…

Página 52

3 Creating a GUI Programmatically 3-4 Function Summary MATLAB provides a suite of functions for creating GUIs. This topic introduces you to the…

Página 53 - 3-D shaded surface plot

Function Summary 3-5 sin Sine; result in radians. sqrt Square root. surf 3-D shaded surface plot. Function Description

Página 54 - Creating a GUI M-File

3 Creating a GUI Programmatically 3-6 Creating a GUI M-File Start by creating an M-file for the example GUI. 1 At the MATLAB prompt, type edit. MATLAB…

Página 55

Laying Out a Simple GUI 3-7 Laying Out a Simple GUI This topic illustrates the basic steps for laying out a GUI. “Creating the Figure” on page 3-7…

Página 56

3 Creating a GUI Programmatically 3-8 These statements use the uicontrol function to create the push buttons. Each statement uses a series of…

Página 57

Laying Out a Simple GUI 3-9 5 Make your GUI visible by adding this command following the align command. set(f,'Visible','on') 6 This is what your…

Página 58

3 Creating a GUI Programmatically 3-10 8 Type help simple_gui at the command line. MATLAB displays this help text. help simple_gui SIMPLE_GUI Select a…

Página 59

Initializing the GUI 3-11 Initializing the GUI When you make the GUI visible, it should be initialized so that it is ready for the user. This topic…

Página 60

3 Creating a GUI Programmatically 3-12 % Move the GUI to the center of the screen. movegui(f,'center') % Make the GUI visible. set(f,'Visible','on')…

Página 61

Initializing the GUI 3-13 set([f,hsurf,hmesh,hcontour,htext,hpopup],... 'Units','normalized'); %Create a plot in the axes. current_data = peaks_data…

Página 62

3 Creating a GUI Programmatically 3-14 Programming the GUI You use callbacks to program the GUI components. Callbacks are the functions that execute…

Página 63

end The next topic, “Programming the Push Buttons” on page 3-15, shows you how to write callbacks for the three push buttons. Programming the Push…

Página 64 - Contour push button, add the

3 Creating a GUI Programmatically 3-16 each component’s Callback property to specify the name of the callback with which it is associated. 1 To the…

Página 65 - Running the Final GUI

Running the Final GUI 3-17 Running the Final GUI You have created the simple GUI. This topic shows you the final M-file and runs the GUI. “The Final…

Página 66

3 Creating a GUI Programmatically 3-18 % Create the data to plot peaks_data = peaks(35); membrane_data = membrane; [x,y] = meshgrid(-8:.5:8); r =…

Página 67

Running the Final GUI 3-19 end end % Push button callbacks. Each callback plots current_data in the % specified plot type. function…

Página 68

3 Creating a GUI Programmatically 3-20 2 In the pop-up menu, select Membrane, then click the Mesh button. The GUI displays a mesh plot of the MATLAB…

Página 69 - Creating GUIs with GUIDE

Creating GUIs with GUIDE These sections describe how to create graphical user interfaces (GUIs) using GUIDE, the MATLAB ® graphical user interface…

Página 71 - What Is GUIDE?

What Is GUIDE? (p. 4-2) Introduces GUIDE, the MATLAB graphical user interface development environment. GUIDE Tools Summary (p. 4-3) Introduces the…

Página 72 - 4 What Is GUIDE?

4 What Is GUIDE? 4-2 What Is GUIDE? GUIDE, the MATLAB Graphical User Interface development environment, provides a set of tools for creating graphical…

Página 73 - GUIDE Tools Summary

GUIDE Tools Summary 4-3 GUIDE Tools Summary The GUIDE tools are available from the Layout Editor shown in the figure below. The tools are called out…

Página 74

4 What Is GUIDE? 4-4 Tool Use This Tool To: Layout Editor Select components from the Component Palette, at the left side of the Layout Editor, and…

Página 75

GUIDE Tools Summary 4-5 You can also set preferences that apply to all GUIs at creation, and options that are GUI-specific. See Chapter 5…

Página 76

4 What Is GUIDE?

Página 77 - Preferences and Options

Preferences and Options GUIDE Preferences (p. 5-2) MATLAB preferences for the GUIDE Layout Editor. GUI Options (p. 5-9) GUIDE options for individual…

Página 78 - 5 Preferences and Options

5 Preferences and Options 5-2 GUIDE Preferences You can set preferences for the GUIDE Layout Editor by selecting Preferences from the MATLAB File…

Página 79 - Prompt to Save on Activate

GUIDE Preferences 5-3 Prompt to Save on Activate When you activate a GUI by clicking the Run button , a dialog box informs you of the impending save…

Página 80

5 Preferences and Options 5-4 Prompt to Save on Export When you select Export from the Layout Editor File menu, a dialog box informs you of the…

Página 81 - All Other Preferences

GUIDE Preferences 5-5 All Other Preferences The GUIDE Layout Editor provides several other preferences. In the MATLAB Preferences dialog box, click…

Página 82

5 Preferences and Options 5-6 The following topics describe the preferences in this dialog: “Show Toolbar” on page 5-6 “Show Names in Component…

Página 83 - GUIDE Preferences

GUIDE Preferences 5-7 Show Names in Component Palette Displays both icons and names in the component palette, as shown below. When unchecked, the…

Página 84

5 Preferences and Options 5-8 Show File Extension in Window Title Displays the filename with its file extension in the Layout Editor window title. If…

Página 85 - GUI Options

GUI Options 5-9 GUI Options After opening a new GUI template in the Layout Editor, but before saving the GUI, you can configure various behaviors for…

Página 86

5 Preferences and Options 5-10 Non-resizable — Users cannot change the window size (default). Proportional — MATLAB automatically rescales the…

Página 87 - Generate FIG-File and M-File

GUI Options 5-11 Generate FIG-File and M-File Select Generate FIG-file and M-file in the GUI Options dialog if you want GUIDE to create both the…

Página 88

5 Preferences and Options 5-12 GUIDE also adds a callback whenever you edit a callback routine from the Layout Editor’s right-click context menu and…

Página 89 - Generate FIG-File Only

GUI Options 5-13 Note This option is available only if you first select the Generate FIG-file and M-File option. Generate FIG-File Only The Generate…

Página 90

5 Preferences and Options 5-14 MATLAB versions 5.3 and earlier. See the guide command for more information. If you select Generate FIG-file only GUIDE…

Página 91

Designing a GUI (p. 6-2) Things to think about when designing a GUI and references to other sources. Starting GUIDE (p. 6-4) Shows you all the ways to…

Página 92

Designing a GUI Before creating the actual GUI, it is important to decide what it is you want your GUI to do and how you want it to work. It is…

Página 93 - Designing a GUI

Designing a GUI 6-3 Many web sites and commercial publications such as the following provide guidelines for designing GUIs: AskTog – Essays on good…

Página 94

Starting GUIDE There are many ways to start GUIDE. You can start GUIDE: From the command line by typing guide. From the Start menu by selecting MATLAB…

Página 95

Selecting a GUI Template 6-5 Selecting a GUI Template GUIDE provides several templates that you can modify to create your own GUIs. The templates are…

Página 96

2 Optionally, name your GUI now by selecting Save on startup as and typing the name in the field to the right. GUIDE saves the GUI before opening it…

Página 97 - GUI with Uicontrols

Selecting a GUI Template 6-7 Select the blank GUI if the other templates are not suitable starting points for the GUI you are creating, or if you…

Página 98

When you run the GUI by clicking the Run icon , the GUI appears as shown in the following figure. When a user enters values for the density and volume…

Página 99 - GUI with Axes and Menu

Selecting a GUI Template 6-9 GUI with Axes and Menu The GUI with axes and menu template is shown in the following figure. When you run the GUI by…

Página 100

You can select other plots in the pop-up menu. Clicking the Update button displays the currently selected plot on the axes. The GUI also has a File…

Página 101 - Yes and No push buttons:

Selecting a GUI Template 6-11 Running the GUI displays the dialog box shown in the following figure: The GUI returns the text string Yes or No…

Página 102

Setting the GUI Size Set the size of the GUI by resizing the grid area in the Layout Editor. Click on the lower-right corner and drag it until the GUI…

Página 103 - Setting the GUI Size

Setting the GUI Size 6-13 3 In the Property Inspector, click the + sign next to Position. The elements of the component’s Position property are…

Página 104

Adding Components to the GUI “Available Components” on page 6-14 “Adding Components to the Layout Area” on page 6-18 “Assigning an Identifier to Each…

Página 105 - Preferences from

Adding Components to the GUI 6-15 When you first open the Layout Editor, the component palette contains only icons. To display the names of the GUI…

Página 106

Component Description Push Button Push buttons generate an action when clicked. For example, an OK button might apply settings and close a dialog box.…

Página 107

Adding Components to the GUI 6-17 Slider Sliders accept numeric input within a specific range by enabling the user to move a sliding bar, which is…

Página 108

Adding Components to the Layout Area This topic tells you how to place components in the layout area and give each component a unique identifier. 1…

Página 109

Adding Components to the GUI 6-19 the upper-left corner of the component to be, then setting the size of the control by dragging the cursor to the…

Página 110

Adding a Component to a Panel or Button Group To add a component to a panel or button group, select the component in the component palette then move…

Página 111

Adding Components to the GUI 6-21 If the component is not entirely contained in the panel or button group, it appears to be clipped in the layout…

Página 112

You can use the Object Browser to determine the child objects of a panel or button group. “Viewing the Object Hierarchy” on page 6-62 tells you how.…

Página 113

Adding Components to the GUI 6-23 1 Select the desired ActiveX control. The right panel shows a preview of the selected control. 2 Click Create, the…

Página 114

See “ActiveX Control” on page 8-31 for information about programming a sample ActiveX control and an example. Assigning an Identifier to Each…

Página 115 - Adding Text to the Components

Adding Components to the GUI 6-25 Adding Text to the Components Many components have labels, lists, or other text that distinguishes them. You can set…

Página 116

2 The component label changes when you click outside the String field. Pop-Up Menu Pop-up menus display a list of choices. 1 In the Property…

Página 117 - Static Text

Adding Components to the GUI 6-27 1 In the Property Inspector, click the button next to String. In the String dialog box that displays, replace the…

Página 118

1 In the Property Inspector, click the button next to String. In the String dialog box that displays, type the text that you want to display when that…

Página 119

Adding Components to the GUI 6-29 2 The list appears in the list box in the Layout Area with the top-most item selected. 3 If the list box is not…

Página 120

and Min properties so that Max-Min>1. For example, Max=2, Min = 0. Set the Value property to the index of the item you want selected when the list box…

Página 121 - Selecting Components

Adding Components to the GUI 6-31 3 If you want to change the position of the title, select the button next to TitlePosition in the Property…

Página 122

Press Ctrl+A to select all child objects of the figure. This does not select components that are child objects of panels or button groups. Click and…

Página 123 - Front-to-Back Positioning

Adding Components to the GUI 6-33 clipboard to the location of the last mouse click. It positions the upper left corner of the contents at the mouse…

Página 124

Bring to Front — move the selected object(s) in front of nonselected objects (available from the right-click context menu, the Layout menu, or the…

Página 125 - Dragging Components

Adding Components to the GUI 6-35 Dragging Components Select one or more components that you want to move, then drag them to the desired position and…

Página 126

2 Click the + sign next to Position. The Property Inspector displays the elements of the Position property. 3 If you have selected only one component…

Página 127 - Resizing Components

Adding Components to the GUI 6-37 Resizing Components You can resize components in one of the following ways: “Dragging a Corner of the Component” on…

Página 128

3 Type the width and height you want the components to be. 4 Reset the Units property to characters. 5 Reset the Units property to its previous…

Página 129 - Aligning Components

Aligning Components 6-39 Aligning Components The Layout Editor provides a number of features that facilitate alignment and distribution of components…

Página 130

The alignment tool provides two types of alignment operations: Align — align all selected components to a single reference line. Distribute — space…

Página 131 - Property Inspector

Aligning Components 6-41 All of the align options (vertical top, center, bottom and horizontal left, center, right) place the selected components with…

Página 132

from left, distance from bottom, height, width]. The values are given in the units specified by the Units property of the component. 1 Select the…

Página 133 - Guide Lines

Aligning Components 6-43 Use the Grid and Rulers dialog (select Grid and Rulers from the Tools menu) to: Control visibility of rulers, grid, and guide…

Página 134

Guide lines used for horizontal alignment Click on the top or left ruler and drag the guide to the desired position Guide line used for vertical…

Página 135 - Setting Tab Order

Setting Tab Order 6-45 Setting Tab Order A GUI’s tab order is the order in which components of the GUI are selected when a user presses the Tab key on…

Página 136

To examine and change the tab order of the panel components, click the panel background to select it, then select Tab Order Editor in the Tools menu…

Página 137 - 3 Mesh push button

Setting Tab Order 6-47 arrow to move the component up or down in the list. If you set the tab order for the three components in the example to be 1…

Página 138

Creating Menus GUIDE enables you to create two kinds of menus: “Menus for the Menu Bar” on page 6-49 — drop-down menus whose titles appear on the…

Página 139 - Menus for the Menu Bar

Creating Menus 6-49 Note In general, programming conventions described for components in Chapter 8, “Programming the GUI” also apply to menu items.…

Página 140

Note By default, GUIDE selects the Menu Bar tab when you open the Menu Editor. 2 Click on the menu title to display a selection of menu properties in…

Página 141 - Adding Items to a Menu

Creating Menus 6-51 Adding Items to a Menu Use the New Menu Item tool to create menu items that are displayed in the drop-down menu. 1 Add an Open…

Página 142

You can also: Choose a keyboard accelerator for the menu item with the Accelerator pop-up menu. In combination with Ctrl, this is the keyboard…

Página 143 - Cascading Menus

Creating Menus 6-53 this field, GUIDE automatically sets the value using a combination of the Tag field and the GUI filename. See “Menu Item” on page…

Página 144

Note See “Menu Item” on page 8-37 for information about programming menu items. Laying Out Three Menus The following Menu Editor illustration shows…

Página 145 - Creating Menus

Creating Menus 6-55 When you run the GUI, the menu titles appear in the menu bar.

Página 146

Context Menus A context menu is displayed when a user right-clicks on the object for which the menu is defined. The Menu Editor enables you to define…

Página 147

Creating Menus 6-57 Adding Items to the Context Menu Use the New Menu Item tool to create menu items that are displayed in the context menu. 1 Add a…

Página 148

2 Fill in the Label and Tag fields for the new menu item. For example, set Label to 'Blue background color' and set Tag to 'blue_background'. Click…

Página 149 - UIContextMenu property

Creating Menus 6-59 Display a check next to the menu item when the menu is first opened by checking Check mark this item. A check indicates the…

Página 150

In the GUI M-file, complete the callback subfunction for each item in the context menu. Each callback executes when a user selects the associated…

Página 151 - Creating Toolbars

Creating Toolbars 6-61 Creating Toolbars GUIDE provides no tool to enable you do add a toolbar. However, you can add a toolbar by adding code to the…

Página 152

Viewing the Object Hierarchy The Object Browser displays a hierarchical list of the objects in the figure, including both components and menus. As you…

Página 153 - Default System Font

Designing for Cross-Platform Compatibility 6-63 Designing for Cross-Platform Compatibility You can create GUIs that behave more consistently when run…

Página 154

Specifying a Fixed-Width Font If you want to use a fixed-width font for a user interface control (uicontrol), set its FontName property to the string…

Página 155 - Generate FIG-file

Designing for Cross-Platform Compatibility 6-65 systems, e.g., the standard shade of gray on the PC differs from that on UNIX, and may not match the…

Página 156

Cross-Platform Compatible Units Cross-platform compatible GUIs should look correct on computers having different screen sizes and resolutions. Since…

Página 157

Designing for Cross-Platform Compatibility 6-67 Units property back to characters, and the components’ Units properties to characters (nonresizable…

Página 158

6 Laying Out a GUI

Página 159 - Saving and Running the

Saving and Running the GUI Naming a GUI and Its Files (p. 7-2) Describes the GUI files and how they are named. Saving a GUI (p. 7-5) Describes the…

Página 160 - 7 Saving and Running the GUI

7 Saving and Running the GUI 7-2 Naming a GUI and Its Files “The GUI Files” on page 7-2 “File and GUI Names” on page 7-3 “How to Assign Names” on page…

Página 161 - How to Assign Names

Naming a GUI and Its Files 7-3 File and GUI Names The M-file and the FIG-file that define your GUI must have the same name. This name is also the name…

Página 162

7 Saving and Running the GUI 7-4 By selecting the Save or Save as options on the File menu GUIDE prompts you for a name before saving the GUI. The…

Página 163 - Saving a GUI

Saving a GUI 7-5 Saving a GUI This section tells you how to save a GUI you have constructed in GUIDE. “Ways to Save a GUI” on page 7-5 “Saving a New…

Página 164

7 Saving and Running the GUI 7-6 Clicking the Save icon on the Layout Editor toolbar Selecting the Save or Save as options on the File menu Clicking…

Página 165 - Saving a New GUI

Saving a GUI 7-7 Note that button groups and panels are introduced in MATLAB 7.0, and you should not use them in GUIs that you expect to run in…

Página 166

7 Saving and Running the GUI 7-8 3 Change the directory if you choose, and then enter the name you want to use for the FIG-file. Be sure to choose a…

Página 167 - Saving an Existing GUI

Saving a GUI 7-9 6 If you chose Yes in the previous step, GUIDE displays a dialog that asks if you want to replace the existing M-file or append to…

Página 168

7 Saving and Running the GUI 7-10 Running a GUI Generally, you run your GUI by executing the M-file that GUIDE generates. This M-file contains the…

Página 169 - From an M-file Script

Running a GUI 7-11 If a GUI accepts arguments when it is run, they are passed to the GUI’s opening function. See “Opening Function” on page 8-15 for…

Página 170

7 Saving and Running the GUI 7-12 Saving and Displaying Only the GUI Layout “Saving a GUI Layout Only” on page 7-12 “Displaying a GUI Layout Only” on…

Página 171 - M-file

Saving and Displaying Only the GUI Layout 7-13 open('mygui.fig') openfig('mygui') hgload('mygui') You can run a GUI that has no M-file only if you set…

Página 172

7 Saving and Running the GUI

Página 173

Callbacks: An Overview (p. 8-2) Introduces the functions, referred to as callbacks, that you use to program GUI behavior. GUI Files: An Overview (p.…

Página 174

Callbacks: An Overview After you have laid out your GUI, you need to program its behavior. The code you write controls how the GUI responds to events…

Página 175 - Callbacks: An Overview

Callbacks: An Overview 8-3 Each kind of callback has a triggering mechanism or event that causes it to be called. The following table lists the…

Página 176

Note User interface controls include push buttons, sliders, radio buttons, check boxes, editable text boxes, static text boxes, list boxes, and toggle…

Página 177 - GUI Files: An Overview

GUI Files: An Overview 8-5 GUI Files: An Overview “M-Files and FIG-Files” on page 8-5 “GUI M-File Structure” on page 8-6 “Adding Callback Templates to…

Página 178

GUI M-File Structure The GUI M-file that GUIDE generates is a function file. The name of the main function is the same as the name of the M-file. For…

Página 179 - View callbacks

GUI Files: An Overview 8-7 Adding Callback Templates to an Existing GUI M-File When you save the GUI, GUIDE automatically adds templates for some…

Página 180

Associating Callbacks with Components A GUI can have many components and GUIDE provides a way of specifying which callback should run in response to a…

Página 181

Associating Callbacks with Components 8-9 - When you save the GUI, GUIDE constructs the name of the callback by appending an underscore ( _) and the…

Página 182

See “Input Arguments” on page 8-13 for information about the callback input arguments. When you save the GUI, GUIDE also opens the GUI M-file in your…

Página 183 - Callback Syntax and Arguments

Callback Syntax and Arguments 8-11 Callback Syntax and Arguments GUIDE defines conventions for callback syntax and arguments and implements these…

Página 184

When GUIDE generates the template, it creates the callback name by appending an underscore (_) and the name of the callback property to the…

Página 185 - The Handles Structure

Callback Syntax and Arguments 8-13 References in the M-file to the field of the handles structure that contains the component’s handle. See “The…

Página 186

handles = figure1: 160.0011 edit1: 9.0020 uipanel1: 8.0017 popupmenu1: 7.0018 pushbutton1: 161.0011 output: 160.0011 GUIDE creates and maintains the…

Página 187 - Initialization Callbacks

Initialization Callbacks 8-15 Initialization Callbacks GUIDE automatically includes two callbacks, the opening function and the output function, in…

Página 188

% Choose default command line output for mygui handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes mygui…

Página 189 - Output Function

Initialization Callbacks 8-17 handles.output = hObject adds a new element, output, to the handles structure and assigns it the value of the input…

Página 190

% Get default command line output from handles structure varargout{1} = handles.output; Input Arguments The output function has three input arguments…

Página 191 - Push Button

Examples: Programming GUI Components 8-19 Examples: Programming GUI Components This section provides basic code examples to get you started…

Página 192

function pushbutton1_Callback(hObject, eventdata, handles) display Goodbye delete(handles.figure1); Adding an Image to a Push Button or Toggle Button…

Página 193 - Check Box

Examples: Programming GUI Components 8-21 elseif button_state == get(hObject,'Min') % Toggle button is not pressed-take appropriate action ... end…

Página 194

function checkbox1_Callback(hObject, eventdata, handles) if (get(hObject,'Value') == get(hObject,'Max')) % Checkbox is checked-take approriate action…

Página 195 - List Box

Examples: Programming GUI Components 8-23 Triggering Callback Execution For both UNIX and Windows, clicking inside the GUI but outside the edit text…

Página 196

function listbox1_Callback(hObject, eventdata, handles) index_selected = get(handles.listbox1,'Value'); list = get(handles.listbox1,'String')…

Página 197

Examples: Programming GUI Components 8-25 is fixed, then you can use this approach. Else, you can use the index to retrieve the actual string for the…

Página 198

Note To set Resize behavior for the figure to Other (Use ResizeFcn), select GUI Options from the Layout Editor Tools menu. 1 This example of a…

Página 199

Examples: Programming GUI Components 8-27 For radio buttons and toggle buttons that are managed by a button group, you must include the code to…

Página 200

plotting of a graph to an axes. In this case, the button’s Callback callback contains the code that generates the plot. This example plots a graph in…

Página 201

Examples: Programming GUI Components 8-29 Plotting to a GUI with Multiple Axes If a GUI has multiple axes, explicitly specify which axes you want to…

Página 202

2 Add this code to the Plot 2 push button’s Callback callback. The contour function displays the contour plot of a matrix, in this case the output of…

Página 203 - ActiveX Control

Examples: Programming GUI Components 8-31 default). From the Layout Editor select Tools -> GUI Options -> Command Line Accessibility: Callback . See…

Página 204

2 Activate the GUI by clicking the Run icon on the toolbar and save the GUI when prompted. GUIDE displays the GUI shown in the following figure and…

Página 205 - View Callbacks from

Examples: Programming GUI Components 8-33 3 View the ActiveX Properties with the Property Inspector. Select the control in the Layout Editor, and then…

Página 206

If you click the GUI enough times, the circle disappears entirely. Programming a User Interface Control to Update an ActiveX Control This topic…

Página 207

Examples: Programming GUI Components 8-35 handles.default_radius = handles.activex1.radius; 3 In the activex1_Click callback, reset the slider’s Value…

Página 208

at the MATLAB prompt. This displays the available methods in a new window, as shown in the following figure. Alternatively, you can enter…

Página 209 - Menu Item

Examples: Programming GUI Components 8-37 Compiling a GUI that Contains an ActiveX Control If you use the MATLAB Compiler mcc command to compile a GUI…

Página 210

When a user selects the to file option under the Edit menu’s Copy option, only the to file callback is required to perform the action. Suppose…

Página 211 - View button

Examples: Programming GUI Components 8-39 Note From the Menu Editor, you can view a menu item’s Callback callback in your editor by selecting the menu…

Página 212

8 Programming the GUI

Página 213 - Application-Defined Data

Managing Application-Defined Data Mechanisms for Managing Data (p. 9-2) Describes various mechanisms for managing application-defined data. Explains…

Página 214 - Mechanisms for Managing Data

9 Managing Application-Defined Data 9-2 Mechanisms for Managing Data Most GUIs generate or use data that is specific to the application. This topic…

Página 215 - GUI Data in GUIDE

Mechanisms for Managing Data 9-3 GUI data provides application developers with a convenient interface to a figure’s application data: You do not need…

Página 216 - Application Data

9 Managing Application-Defined Data 9-4 2 Use the following command to save the data. guidata(hObject,handles) where hObject is the handle of the…

Página 217

Mechanisms for Managing Data 9-5 The following table summarizes the functions that provide access to application data. For more detailed information…

Página 218 - UserData Property

9 Managing Application-Defined Data 9-6 1 Use getappdata to retrieve the structure. From the example in the previous topic, the name of the…

Página 219 - GUI Data

Sharing Data Among a GUI’s Callbacks 9-7 Sharing Data Among a GUI’s Callbacks You can use GUI data, application data, and the UserData property to…

Página 220

9 Managing Application-Defined Data 9-8 The GUI behavior is as follows: When a user moves the slider, the text box displays the slider’s current…

Página 221

Sharing Data Among a GUI’s Callbacks 9-9 3 Set the slider value from the edit text Callback callback. The edit text Callback sets the slider’s value…

Página 222

9 Managing Application-Defined Data 9-10 functions setappdata, getappdata, isappdata, and rmappdata to manage application data. See “Application Data”…

Página 223

Sharing Data Among a GUI’s Callbacks 9-11 % Retrieve and increment the error count. slider_data = getappdata(handles.figure1,'slider')…

Página 224

9 Managing Application-Defined Data 9-12 2 Set the edit text value from the slider Callback callback. Add this statement to the slider Callback.…

Página 225

GUI with Multiple Axes (p. 10-2) Analyze data and generate frequency and time domain plots in the GUI figure. List Box Directory Reader (p. 10-9) List…

Página 226

GUI with Multiple Axes This example creates a GUI that contains two axes for plotting data. For simplicity, this example obtains data by evaluating an…

Página 227 - Design of the GUI

GUI with Multiple Axes 10-3 View Completed Layout and Its GUI M-File If you are reading this in the MATLAB Help browser, you can click the following…

Página 228

To create the default values, set the String property of the edit text. The following figure shows the value set for the time vector. Identifying the…

Página 229 - GUI Option Settings

GUI with Multiple Axes 10-5 For example, the Tag of the axes used to display the FFT is set to frequency_axes. Therefore, within a callback, you…

Página 230

like you would on the command line. Note that Callback is the default setting for command-line accessibility. See “GUI Options” on page 5-9 for more…

Página 231 - Plot Button Code Listing

GUI with Multiple Axes 10-7 Making the appropriate axes current using the axes command and the handle of the axes. For example…

Página 232

plot(t,x) set(handles.time_axes,'XMinorTick','on') grid on

Página 233 - List Box Directory Reader

List Box Directory Reader 10-9 List Box Directory Reader This example uses a list box to display the files in a directory. When the user double clicks…

Página 234

Note The following links execute MATLAB commands and are designed to work within the MATLAB Help browser. If you are reading this online or in PDF…

Página 235

List Box Directory Reader 10-11 First input argument is not a directory, but is a character string and there is more than one argument — execute the…

Página 236

% Populate the listbox load_listbox(initial_dir,handles) Loading the List Box This example creates a subfunction to load items into the list box. This…

Página 237 - The List Box Callback

List Box Directory Reader 10-13 guidata(handles.figure1,handles) set(handles.listbox1,'String',handles.file_names,... 'Value',1)…

Página 238

If the selection is a file — get the file extension (fileparts) to determine if it is a FIG-file, which is opened with guide. All other file types are…

Página 239 - for more information

List Box Directory Reader 10-15 does not take this approach for FIG-files since openfig.m is required by the GUI M-file. See open for more…

Página 240

Accessing Workspace Variables from a List Box This GUI uses a list box to display workspace variables, which the user can then plot. Techniques Used…

Página 241 - Reading Workspace Variables

Accessing Workspace Variables from a List Box 10-17 View Completed Layout and Its GUI M-File If you are reading this in the MATLAB Help browser, you…

Página 242

Enabling Multiple Selection To enable multiple selection in a list box, you must set the Min and Max properties so that Max Min > 1. This requires you…

Página 243

Accessing Workspace Variables from a List Box 10-19 Callbacks for the Plotting Buttons The callbacks for the plotting buttons call get_var_names to…

Página 244

A GUI to Set Simulink Model Parameters This example illustrates how to create a GUI that sets the parameters of a Simulink® model. In addition, the…

Página 245 - Changing the Controller Gains

A GUI to Set Simulink Model Parameters 10-21 all component properties and to understand how the components are assembled to create the GUI. You can…

Página 246

Running the Simulation Once you have set the gain values, you can run the simulation by clicking the Simulate and store results button. The simulation…

Página 247 - Slider Callback

A GUI to Set Simulink Model Parameters 10-23 Determine if the model is open (find_system). Open the block diagram for the model and the subsystem…

Página 248

Calls model_open to ensure that the Simulink model is open so that simulation parameters can be set. Gets the new slider value. Sets the value of the…

Página 249 - Current value text box

A GUI to Set Simulink Model Parameters 10-25 Here is the callback for the Kf Current value text box. function KfCurrentValue_Callback(hObject…

Página 250

Here is the Simulate and store results button callback. function SimulateButton_Callback(hObject, eventdata, handles)…

Página 251

A GUI to Set Simulink Model Parameters 10-27 set(handles.ResultsList,'String',ResultsStr); % Store the new ResultsData handles.ResultsData =…

Página 252

% Store the new ResultsData guidata(hObject, handles) Plotting the Results Data The GUI Plot button callback creates a plot of the run data and adds a…

Página 253 - The GUI Help Button

A GUI to Set Simulink Model Parameters 10-29 % Get data to plot and generate command string with color % specified legendStr =…

Página 254

The which command returns the full path to the file when it is on the MATLAB path The web command displays the file in the Help browser. This is the…

Página 255

A GUI to Set Simulink Model Parameters 10-31 In this case, there is no need for the list box callback to execute, so you should delete it from the GUI…

Página 256

An Address Book Reader This example shows how to implement a GUI that displays names and phone numbers, which it reads from a MAT-file. Techniques…

Página 257 - Running the GUI

An Address Book Reader 10-33 An index pointer that indicates the current name and phone number, which must be updated as the user pages through the…

Página 258

GUI M-file options selected: Generate callback function prototypes Application allows only one instance to run Calling the GUI You can call the GUI…

Página 259 - Validating the MAT-file

An Address Book Reader 10-35 & the second element is a MATLAB file, then load that file elseif (length(varargin) == 2 && ...…

Página 260

Check_And_Load Code Listing This is the Check_And_Load function. function pass = Check_And_Load(file,handles) % Initialize the variable "pass" to…

Página 261 - Open_Callback Code Listing

An Address Book Reader 10-37 guidata(handles.Address_Book,handles) else errordlg('Not a valid Address Book','Address Book Error') end The Open Menu…

Página 262

The Contact Name Callback The Contact Name text box displays the name of the address book entry. If you type in a new name and press enter, the…

Página 263 - Cancel from the question

An Address Book Reader 10-39 set(handles.Contact_Name,'string',Addresses(i).Name) set(handles.Contact_Phone,'string',Addresses(i).Phone) handles.Index…

Página 264

dialog. Both the current address book and the index pointer are saved in the handles structure so that this data is available to other callbacks. If…

Página 265 - Code Listing

An Address Book Reader 10-41 Determining Which Button Is Clicked The callback defines an additional argument, str, that indicates which button, Prev…

Página 266

% If the index is less than one then set it equal to the index % of the last element in the Addresses array if i < 1 i = length(Addresses); end case…

Página 267 - Save_Callback Code Listing

An Address Book Reader 10-43 the Contact_Name_Callback or the Contact_Phone_Callback updates handles.Addresses. Saving the MAT-File If the user…

Página 268

save(File,'Addresses') handles.LastFile = File; guidata(hObject, handles) end end The Create New Menu The Create New menu simply clears the Contact…

Página 269 - Changing the Height

An Address Book Reader 10-45 Changing the Width If the new width is greater than the original width, set the figure to the new width. The size of the…

Página 270

Original_Size = [ 0 0 94 19.230769230769234]; % If the resized figure is smaller than the % original figure size then compensate. if…

Página 271

Using a Modal Dialog to Confirm an Operation 10-47 Using a Modal Dialog to Confirm an Operation This example illustrates how to use the modal dialog…

Página 272

Note The following links execute MATLAB commands and are designed to work within the MATLAB Help browser. If you are reading this online or in PDF…

Página 273

Using a Modal Dialog to Confirm an Operation 10-49 Setting Up the GUI with the Close Button To set up the second GUI with a Close button, do the…

Página 274

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) 9 After these…

Página 275 - How the GUI and Dialog Work

Using a Modal Dialog to Confirm an Operation 10-51 Clicking the Yes button closes both the close dialog and the GUI that calls it. Clicking the No…

Página 276

Updates the output field in the handles structure Executes uiresume to return control to the opening function where uiwait is called. 5 The output…

Página 277 - Programmatically

Creating GUIs Programmatically This section provides examples of graphical user interfaces (GUIs) created programmatically. Note Following the release…

Página 279 - Functions for Creating

Functions for Creating GUIs Introduction (p. 11-2) Introduces the topic. Function Summary (p. 11-3) Summarizes MATLAB functions specifically intended…

Página 280 - Introduction

11 Functions for Creating GUIs 11-2 Introduction MATLAB provides a selection of functions for creating GUIs. Some of these create standard dialog…

Página 281 - Function Summary

Function Summary 11-3 Function Summary “Predefined Dialog Boxes” on page 11-3 “Creating Components” on page 11-3 “ActiveX Controls” on page 11-4…

Página 282 - Working with Preferences

11 Functions for Creating GUIs 11-4 ActiveX Controls Using Application-Defined Data Interactive User Input Working with Preferences uitoggletool…

Página 283 - Utilities

Function Summary 11-5 Utilities setpref Set preference uigetpref Open dialog box for retrieving preferences uisetpref Manage preferences used in…

Página 284

11 Functions for Creating GUIs

Página 285 - Examples of GUIs Created

Examples of GUIs Created Programmatically Introduction (p. 12-8) Introduces the examples and lists the programming techniques they illustrate. GUI…

Página 286

Introduction This chapter provides three examples that illustrate the application of certain techniques in programmatically created GUIs. “GUI with…

Página 287 - The Example

GUI with Axes, Menu, and Toolbar 12-9 GUI with Axes, Menu, and Toolbar The initial topics introduce the example and the techniques it illustrates…

Página 288

You can select other plots in the pop-up menu. Clicking the Update button displays the currently selected plot on the axes. The GUI File menu has…

Página 289 - Creating the Data

GUI with Axes, Menu, and Toolbar 12-11 Techniques Used in the Example This example illustrates the following techniques: Passing input arguments to…

Página 290 - The Main Figure

mOutputArgs = {}; % Variable for storing output when GUI returns mPlotTypes is a 5-by-2 cell array that holds the data to be plotted in the axes. The…

Página 291 - The Axes

GUI with Axes, Menu, and Toolbar 12-13 The figure function creates the GUI figure. Setting the MenuBar and Toolbar properties to none, prevents the…

Página 292 - The Update Push Button

Note If you specify the Units property, then the Position property, and any other properties that depend on the value of the Units property, should…

Página 293 - File, and the items it

GUI with Axes, Menu, and Toolbar 12-15 The uicontrol function creates various user interface controls based on the value of the Style property. This…

Página 294 - The Toolbar and Its Tools

Here, setting the Parent property of the File menu to hMainFigure makes it the child of the main figure. This statement creates a menu bar in the…

Página 295 - Initializing the GUI

GUI with Axes, Menu, and Toolbar 12-17 The uipushtool TooltipString property assigns a tool tip that displays when the GUI user moves the mouse…

Página 296 - Defining the Callbacks

Defining the Callbacks This topic defines the callbacks that service the components of the GUI. Because the callback definitions are at a lower level…

Página 297 - Open Menu Item Callback

GUI with Axes, Menu, and Toolbar 12-19 Note MATLAB automatically passes hUpdateButtonCallback two arguments, hObject and eventdata, because the Update…

Página 298 - Close Menu Item Callback

Print Menu Item Callback The hPrintMenuitemCallback function services the Print menu item and the Print toolbar button . Selecting the menu item or…

Página 299

GUI with Axes, Menu, and Toolbar 12-21 if strcmp(selection,'No') return; end delete(hMainFigure); end The hCloseMenuitemCallback function calls the…

Página 300 - Color Palette

Color Palette The color palette example includes these topics: “The Example” on page 12-22 “Techniques Used in the Example” on page 12-25 “View the…

Página 301 - Using the Color Palette

Color Palette 12-23 The Components The colorPalette includes the following components: An array of color cells defined as toggle buttons An Eraser…

Página 302 - NaN, that

Displays the selected color in the preview area. The red, green, and blue values for the newly selected color are displayed in the R, G, and B fields…

Página 303 - View the Completed GUI M-File

Color Palette 12-25 The colorPalette function accepts property value pairs as input arguments. Only the custom property Parent is supported. This…

Página 304 - Subfunction Summary

Note The following link executes MATLAB commands and is designed to work within the MATLAB Help browser. If you are reading this online or in PDF, you…

Página 305 - M-File Structure

Color Palette 12-27 Note Three eventdata fields are defined for use with button groups ( uibuttongroup). These fields enable you to determine the…

Página 306 - GUI Programming Techniques

2 Data creation. Because the example uses nested functions, defining this data at the top level makes the data accessible to all functions without…

Página 307

Color Palette 12-29 Passing Input Arguments to a GUI Inputs to the GUI are custom property/value pairs. colorPalette allows one such property: Parent.…

Página 308 - Sharing Data Between Two GUIs

2 If it finds a match, processUserInputs assigns the value that was input for the property to its variable in the third column of the mPropertyDefs…

Página 309

Color Palette 12-31 Just before returning, colorPalette assigns mOutputArgs the function handle for its getSelectedColor helper function and then…

Página 310

% update color of the selected block mIconCData(y, x,:) = color; localUpdateIconPlot(); end end

Página 311 - Icon Editor

Icon Editor 12-33 Icon Editor The icon editor example includes these topics: “The Example” on page 12-33 “Techniques Used in the Example” on page…

Página 312 - Using the Icon Editor

The Components The GUI includes the following components: A edit text that instructs the user or contains the name of the file to be edited. The edit…

Página 313

Icon Editor 12-35 3 Erase the color in some squares. Click the Eraser button on the palette Click in specific squares to erase those squares Click and…

Página 314

Note The following links execute MATLAB commands and are designed to work within the MATLAB Help browser. If you are reading this online or in PDF…

Página 315

Icon Editor 12-37 The example also includes the helper functions listed in the following table. M-File Structure The iconEditor is programmed using…

Página 316

3 GUI figure and component creation. 4 Command line input processing. 5 GUI initialization. 6 Block execution of the program until the GUI user clicks…

Página 317 - Cancel button, its callback

Icon Editor 12-39 Returning Only After the User Makes a Choice At the end of the initialization code, and just before returning, iconEditor calls…

Página 318

Passing Input Arguments to a GUI Inputs to the GUI are custom property/value pairs. iconEdit allows three such properties: IconWidth, IconHeight, and…

Página 319

Icon Editor 12-41 1 processUserInputs sequences through the inputs, if any, and tries to match each property name to a string in the first column of…

Página 320

% different platforms prepareLayout(hMainFigure); prepareLayout first uses findall to retrieve the handles of all objects contained in the figure. The…

Página 321

Icon Editor 12-43 Background Color. The default component background color is the standard system background color on which the GUI is running. This…

Página 322 - Making a GUI Modal

Character units are defined by characters from the default system font. The width of a character unit equals the width of the letter x in the system…

Página 323

Icon Editor 12-45 function color = getSelectedColor % function returns the currently selected color in this % colorPlatte color = mSelectedColor; The…

Página 324

iconEditor calls prepareLayout with the handle of the main figure, in the initialization section of the M-file. prepareLayout(hMainFigure); First…

Página 325

Icon Editor 12-47 height of a character unit is the distance between the baselines of two lines of text. Note that character units are not square.

Página 326

12 Examples of GUIs Created Programmatically

Página 327 - UserData property 9-6

Index-1 Index A ActiveX controls adding to layout 6-22 programming 8-31 aligning components in GUIDE 6-39 Alignment Tool GUIDE 6-39 application data…

Página 328

Index Index-2 cross-platform compatibility GUI background color 6-64 GUI design 6-63 GUI fonts 6-63 GUI units 6-66 D data sharing among GUI callbacks…

Página 329

Index Index-3 GUI object hierarchy viewing in GUIDE 6-62 GUI options (GUIDE) function prototypes 5-11 singleton 5-11 system color background 5-11 GUI…

Página 330 - UserData property

Index Index-4 M-file generated by GUIDE 5-11 moving components in GUIDE 6-34 N naming a GUI in GUIDE 7-2 O Object Browser (GUIDE) 6-62 opening .fig…

Mais documentos para Software MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE

Perguntas sobre MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE

Ainda não há perguntas sobre este manual. Faça a primeira.

Fazer uma pergunta

Respondemos a partir do manual e indicamos a página. A pergunta é publicada no site depois de verificada.

Todas as perguntas e respostas ›

Manuais e produtos relacionados com Software MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE