
Initializing the GUI
3-13
set([f,hsurf,hmesh,hcontour,htext,hpopup],...
'Units','normalized');
%Create a plot in the axes.
current_data = peaks_data;
surf(current_data);
% Assign the GUI a name to appear in the window title.
set(f,'Name','Simple GUI')
% Move the GUI to the center of the screen.
movegui(f,'center')
% Make the GUI visible.
set(f,'Visible','on');
end
3 Run your script by typing simple_gui at the command line. This is what
your GUI should now look like.
The next topic, “Programming the GUI” on page 3-14, shows you how to
program the push buttons and pop-up menu so you can interactively
generate different plots in the axes.
Kommentare zu diesen Handbüchern