MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manuel d'utilisateur Page 299

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 330
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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.
Vue de la page 298
1 2 ... 294 295 296 297 298 299 300 301 302 303 304 ... 329 330

Commentaires sur ces manuels

Pas de commentaire