User`s guide

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