MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manual do Utilizador Página 299

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 500
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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.
Vista de página 298
1 2 ... 294 295 296 297 298 299 300 301 302 303 304 ... 499 500

Comentários a estes Manuais

Sem comentários