Seth on Simulink
August 28th, 2009
BEEP, Simulink versus MATLAB
Did you ever notice that a BEEP in Simulink means something
different from a BEEP in MATLAB?
BEEP, What BEEP?
What I’m talking about is that bell character you sometimes
hear. In older version of MATLAB (Pre R14), you could actually display a beep
on the screen.
>> fprintf('\a')
>> disp(char(7))
In more recent version, the command window doesn’t display
the BEEP character. Instead, you can call the function BEEP.
>> beep
You hear it under different circumstances for Simulink
versus MATLAB.
MATLAB BEEP == Error
In MATLAB, the BEEP alerts you to an error. Sometimes you
get it because your calling syntax is wrong, sometimes when the tab completion can’t
find anything. In MATLAB, BEEP is bad.
>> plot(x,y
??? plot(x,y
|
Error: Expression or statement is incorrect--possibly unbalanced
(, {, or [.
Simulink BEEP == Done
In Simulink, the BEEP happens when your simulation is
finished. It is a beautiful sound. The BEEP is an alert to tell you the work
is done. The fruit of your simulation is ready to harvest. It is time to
review your results. In Simulink, BEEP is a good sound.
>> vdp
>> set_param(bdroot,'SimulationCommand','start')

Leave your comments, after the BEEP. (THANK YOU Jeannette for alerting me to the difference.)
21:44 UTC |
Posted in Fun |
Permalink |
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.
Leave a Reply
|
Hi Seth,
I’m posting a question here as Doug refered to your Simulink blog when I googled the problem I’m having
link(
http://blogs.mathworks.com/pick/2008/02/27/advanced-matlab-calling-simulink-from-matlab/
)
I’ve got a Simulink question with regards to calling the sim(’ModelName’) command from within a Matlab Script.
When running nested functions in a Matlab script each nested function creates its own memory Stack. And when I call the ’sim’ command from within any nested function it seems to be linked to the base “workspace” memory stack and not the function Stack. Is there a way to link the ’sim’ memory stack with the memory stack of the function that its called from?
Cheers,
Janti
@ Janti: If you look at the documentation for the SIM command, you will see a section titled “Superseding the Base Workspace”. This explains how to use an ‘options’ structure containing the ‘SrcWorkspace’ field that can be used to specify which workspace is searched last during hierarchical symbol resolution.