Guy on Simulink

Simulink & Model-Based Design

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the Original version of the page.

BEEP, Simulink versus MATLAB 5

Posted by Seth Popinchalk,

Did you ever notice that a BEEP in Simulink means something
different from a BEEP in MATLAB?


 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.


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
(, {, 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')

The VDP model in Simulink

Leave your comments, after the BEEP. (THANK YOU Jeannette for alerting me to the difference.)

5 CommentsOldest to Newest

Janti replied on : 1 of 5
Hi Seth, I'm posting a question here as Doug refered to your Simulink blog when I googled the problem I'm having link( ) 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
Guy replied on : 2 of 5
@ 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.
Sauli replied on : 3 of 5
How do I get the the bell alert off on MATLAB, btw...? I like having sounds on on my computer in general but hearing the bell everytime I press backspace one too many times drives me nuts...
Nigel replied on : 5 of 5
But maybe I dont want a ding every time I run a simulation because it drives the other people in the office crazy. There are many comments elsewhere from other people who also want to to turn the ding off and find they cannot. Is it not possible to add some sound options?