1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
function simple_gui
% Create and then hide the GUI as it is being constructed.
f = figure('Visible','off','doublebuffer','on','Position',[0,0,1200,620]);
% Construct the components.
%bouton lire/ouvrir le signal
hsurf = uicontrol('Style','pushbutton','String','Read signal',...
'Position',[20,20,70,25],...
'Callback',{@surfbutton_Callback});
% Initialize the GUI.
% Change units to normalized so components resize automatically.
set([ha,hsurf,nbpts,cpl],...
'Units','normalized');
%Create a plot in the axes.
% 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'); |
Partager