image thumbnail
from Gui Example - Stop Start Loop & Icon Change & Build Exe by Yohanan Sivan
Example of 3 things: 1. Stop and start a loop 2. Change Gui icon 3. Build EXE

mybuild.m
%% starting
fclose all; close all; clear all;
clc; fprintf('starting %s\n',datestr(now)); pause(0.1); 


%% compiling
%mbuild -setup
mcc -ev mygui.m
s='C:\Program Files\MATLAB_Network_R2008a\toolbox\compiler\deploy\win32\MCRInstaller.exe';
copyfile(s,'.');


%% ending
fclose all; fprintf('ending %s\n',datestr(now)); 

Contact us at files@mathworks.com