MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manuale Utente Pagina 299

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 500
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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.
Vedere la pagina 298
1 2 ... 294 295 296 297 298 299 300 301 302 303 304 ... 499 500

Commenti su questo manuale

Nessun commento