MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Bedienungsanleitung Seite 299

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 500
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 298
Plot Workspace Variables in a GUIDE UI
9-53
To get and view the example code:
1
Copy the example FIG-file and code file to your current (writeable) folder and open
the FIG-file in GUIDE with the following commands:
copyfile(fullfile(docroot, 'techdoc','creating_guis',...
'examples','lb.*')), fileattrib('lb.*', '+w')
guide lb.fig
2
From GUIDE Layout Editor, click the Editor button .
The lb.m code displays in the MATLAB Editor.
Read Workspace Variables
When the UI initializes, it queries the workspace variables and sets the list box String
property to display these variable names. Adding the following local function to the UI
code, lb.m, accomplishes this using evalin to execute the who command in the base
workspace. The who command returns a cell array of strings, which are used to populate
the list box.
Seitenansicht 298
1 2 ... 294 295 296 297 298 299 300 301 302 303 304 ... 499 500

Kommentare zu diesen Handbüchern

Keine Kommentare