image thumbnail
from Simulink Waitbar by Jeremy Schaeffer
Allows user to see a progress bar for a simulink simulation when running the model from Matlab.

Sim_WaitBar.m
% Copy and paste the code below into the m-file that calls your simulink model
% Copy and paste the blocks in model.mdl into your simulink model (paste anywhere)
% Change variables as necessary


h = waitbar(0,'Please wait...');

End_Time = 100;

myoptions = simset('SrcWorkspace','current','DstWorkspace','current','FixedStep', 0.1);
sim('model',End_Time,myoptions)

close(h)

Contact us at files@mathworks.com