MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Specifikace Strana 27

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 180
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 26
Getting Started Example
1-19
data_popup_Callback(handles.data_popup,[],handles)
Push Button Callbacks
Each of the push buttons creates a different type of plot using the data specified
by the current selection in the popup menu. Their callbacks get data from the
handles structure and then plot it.
Surf push button callback:
function varargout = surf_pushbutton_Callback(h,eventdata,handles,varargin)
z = handles.data; % Load data from handles structure
surf(z);
Mesh push button callback:
function varargout = mesh_pushbutton_Callback(h,eventdata,handles,varargin)
z = handles.data; % Load data from handles structure
mesh(z)
Contour push button callback:
function varargout =
contour_pushbutton_Callback(h,eventdata,handles,varargin)
z = handles.data; % Load data from handles structure
contour(z)
Example – Testing the GUI
After writing the callbacks, you can activate the GUI to test it. Activate the
GUI by selecting
Activate Figure from the Tools menu or use the activator
button from the GUIDE toolbar. Select
membrane in the popup menu and press
the
Contour push button. The GUI should look like this:
Zobrazit stránku 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 ... 179 180

Komentáře k této Příručce

Žádné komentáře