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

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 330
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 298
GUI with Axes, Menu, and Toolbar
12-21
if strcmp(selection,'No')
return;
end
delete(hMainFigure);
end
The hCloseMenuitemCallback function calls the questdlg function to create
and open the question dialog box shown in the following figure.
If the user clicks the
No button, the callback returns. If the user clicks the Yes
button, the callback deletes the GUI.
See “Helper Function: Plotting the Plot Types” on page 12-21 for a description
of the
localUpdatePlot function.
Helper Function: Plotting the Plot Types
The example defines the localUpdatePlot function at the same level as the
callback functions. Because of this,
localUpdatePlot has access to the same
data and component handles.
function localUpdatePlot
% Helper function for plotting the selected plot type
mPlotTypes{get(hPlotsPopupmenu, 'Value'), 2}(hPlotAxes);
end
The localUpdatePlot function uses the pop-up menu Value property to
identify the selected menu item from the first column of the
mPlotTypes 5-by-2
cell array, then calls the corresponding anonymous function from column two
of the cell array to create the plot in the axes.
Vista de página 298
1 2 ... 294 295 296 297 298 299 300 301 302 303 304 ... 329 330

Comentários a estes Manuais

Sem comentários