{"id":64,"date":"2009-08-28T21:44:05","date_gmt":"2009-08-28T21:44:05","guid":{"rendered":"https:\/\/blogs.mathworks.com\/seth\/2009\/08\/28\/beep-simulink-versus-matlab\/"},"modified":"2009-08-28T21:44:05","modified_gmt":"2009-08-28T21:44:05","slug":"beep-simulink-versus-matlab","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/simulink\/2009\/08\/28\/beep-simulink-versus-matlab\/","title":{"rendered":"BEEP, Simulink versus MATLAB"},"content":{"rendered":"<p>Did you ever notice that a BEEP in Simulink means something\r\ndifferent from a BEEP in MATLAB?<\/p>\r\n\r\n<p><strong>BEEP, What BEEP?<\/strong><\/p>\r\n\r\n<p>\u00a0What I\u2019m talking about is that bell character you sometimes\r\nhear.\u00a0 In older version of MATLAB (Pre R14), you could actually display a beep\r\non the screen. <\/p>\r\n\r\n<code style=\"font-size: 11pt;\"><span style='font-size:12.0pt;font-family:\"Courier New\";\r\ncolor:black'>&gt;&gt; fprintf('\\a')<\/span><br>\r\n\r\n<span style='font-size:12.0pt;font-family:\"Courier New\";\r\ncolor:black'>&gt;&gt; disp(char(7))<\/span><\/code>\r\n\r\n\r\n\r\n<p>In more recent version, the command window doesn\u2019t display\r\nthe BEEP character.\u00a0 Instead, you can call the function <a\r\nhref=\"https:\/\/www.mathworks.com\/help\/releases\/R2009a\/techdoc\/ref\/beep.html\">BEEP<\/a>.<\/p>\r\n\r\n<code style=\"font-size: 11pt;\"><span style='font-size:12.0pt;font-family:\"Courier New\";\r\ncolor:black'>&gt;&gt; beep<\/span><\/code>\r\n\r\n\r\n\r\n<p>You hear it under different circumstances for Simulink\r\nversus MATLAB.<\/p>\r\n\r\n<p><strong>MATLAB BEEP == Error<\/strong><\/p>\r\n\r\n<p>In MATLAB, the BEEP alerts you to an error.\u00a0 Sometimes you\r\nget it because your calling syntax is wrong, sometimes when the tab completion can\u2019t\r\nfind anything.\u00a0 In MATLAB, BEEP is bad.<\/p>\r\n\r\n<code style=\"font-size: 11pt;\"><span style='font-size:12.0pt;font-family:\"Courier New\";\r\ncolor:black'>&gt;&gt; plot(x,y<\/span><br>\r\n\r\n<span style='font-size:12.0pt;font-family:\"Courier New\";\r\ncolor:red'>??? plot(x,y<\/span><br>\r\n\r\n<span style='font-size:12.0pt;font-family:\"Courier New\";\r\ncolor:red'>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<\/span><br>\r\n\r\n<span style='font-size:12.0pt;font-family:\"Courier New\";\r\ncolor:red'>Error: Expression or statement is incorrect--possibly<br> unbalanced\r\n(, {, or [.<\/span><\/code>\r\n\r\n<p><strong>Simulink BEEP == Done<\/strong><\/p>\r\n\r\n<p>In Simulink, the BEEP happens when your simulation is\r\nfinished.\u00a0 It is a beautiful sound.\u00a0 The BEEP is an alert to tell you the work\r\nis done.\u00a0 The fruit of your simulation is ready to harvest. It is time to\r\nreview your results. In Simulink, BEEP is a good sound.<\/p>\r\n\r\n<code style=\"font-size: 11pt;\"><span style='font-size:12.0pt;font-family:\"Courier New\";\r\ncolor:black'>&gt;&gt; vdp<\/span><br>\r\n<span style='font-size:12.0pt;font-family:\"Courier New\";\r\ncolor:black'>&gt;&gt; set_param(bdroot,<\/span><span style='font-size:12.0pt;\r\nfont-family:\"Courier New\";color:#A020F0'>'SimulationCommand'<\/span><span\r\nstyle='font-size:12.0pt;font-family:\"Courier New\";color:black'>,<\/span><span\r\nstyle='font-size:12.0pt;font-family:\"Courier New\";color:#A020F0'>'start'<\/span><span\r\nstyle='font-size:12.0pt;font-family:\"Courier New\";color:black'>)<\/span><\/code>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2009Q3\/vdpBEEP.png\" alt=\"The VDP model in Simulink\"><\/p>\r\n\r\n<p>Leave your comments, <a\r\nhref=\"https:\/\/blogs.mathworks.com\/seth\/?p=64&amp;#comment\">after the BEEP<\/a>. (THANK YOU Jeannette for alerting me to the difference.)<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Did you ever notice that a BEEP in Simulink means something\r\ndifferent from a BEEP in MATLAB?\r\n\r\nBEEP, What BEEP?\r\n\r\n\u00a0What I\u2019m talking about is that bell character you sometimes\r\nhear.\u00a0 In older... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/simulink\/2009\/08\/28\/beep-simulink-versus-matlab\/\">read more >><\/a><\/p>","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[71],"tags":[103,460,441],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/64"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/comments?post=64"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/64\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/media?parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/categories?post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/tags?post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}