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.)
- カテゴリ:
- Fun
コメント
コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。