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

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 330
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 64
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 M-File” on page 3-17
“Running the GUI” on page 3-19
The Final M-File
This is what your final M-file should now look like:
function simple_gui
% SIMPLE_GUI Select a data set from the pop-up menu, then
% click one of the plot-type push buttons. Clicking the button
% plots the selected data in the axes.
% Create and then hide the GUI as it is being constructed.
f = figure('Visible','off','Position',[360,500,450,285]);
% Construct the components
hsurf = uicontrol('Style','pushbutton','String','Surf',...
'Position',[315,220,70,25],...
'Callback',{@surfbutton_Callback});
hmesh = uicontrol('Style','pushbutton','String','Mesh',...
'Position',[315,180,70,25],...
'Callback',{@meshbutton_Callback});
hcontour = uicontrol('Style','pushbutton',...
'String','Countour',...
'Position',[315,135,70,25],...
'Callback',{@contourbutton_Callback});
htext = uicontrol('Style','text','String','Select Data',...
'Position',[325,90,60,15]);
hpopup = uicontrol('Style','popupmenu',...
'String',{'Peaks','Membrane','Sinc'},...
'Position',[300,50,100,25],...
'Callback',{@popup_menu_Callback});
ha = axes('Units','Pixels','Position',[50,60,200,185]);
align([hsurf,hmesh,hcontour,htext,hpopup],'Center','None');
Vista de página 64
1 2 ... 60 61 62 63 64 65 66 67 68 69 70 ... 329 330

Comentários a estes Manuais

Sem comentários