function GUI
close all
hButt = uicontrol('Units', 'normalized', 'Style', 'pushbutton', 'String', ...
    'pushbutton', 'ForegroundColor', 'white', ...
    'BackgroundColor', [0.7 0.2 0], 'FontWeight', 'bold', ...
    'FontSize', 11, 'Position', [0.1 0.65 0.15 0.1]);
hButt.Callback = @pressButton;
end
 
function pressButton(scr, event)
% scr and event are default parameters returned by callback functions
% scr   - callback source (button handle object in this case)
% event - info on event raised (sometimes usefull)
 
disp(scr);   % check list – object handle
  disp(event); % show info on raised event
  set(scr, 'String', 'Done', 'BackgroundColor', rand(1, 3));
end
