{"id":677,"date":"2012-04-16T13:32:41","date_gmt":"2012-04-16T18:32:41","guid":{"rendered":"https:\/\/blogs.mathworks.com\/seth\/?p=677"},"modified":"2012-04-16T13:32:41","modified_gmt":"2012-04-16T18:32:41","slug":"a-scope-for-simulink-and-matlab","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/simulink\/2012\/04\/16\/a-scope-for-simulink-and-matlab\/","title":{"rendered":"A scope for Simulink and MATLAB"},"content":{"rendered":"<p>Do you know about the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2012a\/toolbox\/dsp\/ref\/timescope.html\">Time Scope<\/a> available with the <a href=\"https:\/\/www.mathworks.com\/products\/dsp-system\/\">DSP System Toolbox<\/a>?<\/p>\r\n\r\n<p>This visualization tool was introduced in release R2010a and has been improved upon every release thereafter.<\/p>\r\n\r\n<p>The novelty of this tool is that it ships as both a Simulink <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2012a\/toolbox\/dsp\/ref\/timescope.html\">block<\/a> and a <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2012a\/toolbox\/dsp\/gs\/br_xl0s.html\">System object<\/a> (<a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2012a\/toolbox\/dsp\/ref\/dsp.timescopeclass.html\">dsp.TimeScope<\/a>) and therefore offers the same graphical user interface, parameters, and tools in both the MATLAB and Simulink environments.\r\n\r\n<p><strong>A Scope for Simulink<\/strong><\/p>\r\n\r\n<p>To use it in a model, just drag the block from the Library Browser and connect the signal you want to visualize.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2012Q2\/TimeScope2.gif\" alt=\"Time Scope block\"><\/p>\r\n\r\n<p>As you can see, when used in Simulink, the Time Scope allows you to control the simulation directly on the scopes, for example, it has Start, Pause and Stop buttons. In addition, there is a button to highlight and quickly find the block corresponding to the Scope within the model.<\/p>\r\n\r\n<p><strong>A Scope for MATLAB<\/strong><\/p>\r\n\r\n<p>For MATLAB-based simulations, the Time Scope System object offers the standard System object methods, for example:<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2012Q2\/scopeFromMATLAB.png\" alt=\"Time Scope System object\"><\/p>\r\n\r\n<p><strong>So, what is unique about the Time Scope?<\/strong><\/p>\r\n\r\n<p>Both the block and System object offer many common features, for example, both include integrated measurement panels, which display Signal Statistics, peak detection and Bi-level measurements:<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2012Q2\/TSstatistics.png\" alt=\"Integrated Measurement Panel\"><\/p>\r\n\r\n<p>The Time Scope has a configurable layout that lets you select the number of rows and columns used to display multiple axes:<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2012Q2\/TSLayout.png\" alt=\"Customizable Layout\"><\/p>\r\n\r\n<p>Unique to this scope is its ability to accept input data as both sample-based and frame-based signals. Also, both block and System object accept complex data and automatically display the data as Magnitude and Phase, or real and imaginary parts.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2012Q2\/TimeScopeRealImag.gif\" alt=\"Visualizing Frames of complex data\"><\/p>\r\n\r\n<p><strong>Look at the demos<\/strong><\/p>\r\n\r\n<p>Many of the Simulink and MATLAB based examples of the DSP System Toolbox have been updated to take advantage of the Time Scope features. From the Help Browser, look in the demo section of the DSP System Toolbox:<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2012Q2\/dsp_demos.png\" alt=\"DSP System Toolbox Demos\"><\/p>\r\n\r\n<p>For MATLAB users, you will find demos like:<\/p>\r\n\r\n<ul>\r\n\t<li>Envelope Detection<\/li>\r\n\t<li>GSM Digital Down Converter<\/li>\r\n<\/ul>\r\n\r\n<p>and for Simulink:<\/p>\r\n\r\n<ul>\r\n\t<li>Audio Sample Rate Conversion<\/li>\r\n\t<li>Autoscaling and Curve Fitting<\/li>\r\n<\/ul>\r\n\r\n<p>Moreover, I strongly recommend going through the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2012a\/toolbox\/dsp\/ref\/timescope.html\">block documentation<\/a> to see everything the Time Scope can do.<\/p>\r\n\r\n<p><strong>Now it's your turn<\/strong><\/p>\r\n\r\n<p>What do you think of the Time Scope? Let us know by leaving a <a href=\"https:\/\/blogs.mathworks.com\/seth\/?p=677&amp;#comment\">comment here<\/a><\/p>\r\n\r\n<br>\r\n","protected":false},"excerpt":{"rendered":"<p>Do you know about the Time Scope available with the DSP System Toolbox?\r\n\r\nThis visualization tool was introduced in release R2010a and has been improved upon every release thereafter.\r\n\r\nThe novelty... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/simulink\/2012\/04\/16\/a-scope-for-simulink-and-matlab\/\">read more >><\/a><\/p>","protected":false},"author":41,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[73,11,16],"tags":[444,124,141,263],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/677"}],"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\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/comments?post=677"}],"version-history":[{"count":27,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/677\/revisions"}],"predecessor-version":[{"id":801,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/677\/revisions\/801"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/media?parent=677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/categories?post=677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/tags?post=677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}