MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE User's Guide Page 84

  • Download
  • Add to my manuals
  • Print
  • Page
    / 759
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 83
3 How to Create a Simple GUI Programmatically
set(f,'Name','Simple GUI')
% Move the GUI to the center of the sc reen .
movegui(f,'center')
% Make the GUI visible.
set(f,'Visible','on');
end
3 Run your code by typing simple_gui2 at the command line. The
initialization above cause it to display the default
peaks data with the surf
function, making the GUI look like this.
The ne
xt topic, “Code the Simple Programmatic GUI” on page 3-11,
shows
you h ow to program the push buttons and pop-up m enu so you can
inte
ractively generate different plots in the axes.
The C
ompleted Simple Programmatic GUI Code File
Thi
s is what your code file should now look like:
function simple _gui 2
% SIMPLE_GUI 2 Select a data set from the pop-u p menu, then
% click one of the plot-typ e push buttons. Cli cking the button
% plots the selected data i n the axes.
3-16
Page view 83
1 2 ... 79 80 81 82 83 84 85 86 87 88 89 ... 758 759

Comments to this Manuals

No comments