Why is there a glitch in Scope window in Simulink 8.4 (R2014b) and Simulink 8.5 (R2015a)?

2 views (last 30 days)
I have a Simulink model with a discrete signal that I want to plot using a Scope block, and before I start my simulation, the Scope window is open. After I start the simulation, I double-click on the Scope block for which the window is already open, and this causes a glitch in the rendered plot. Why is there glitch on the Scope window in Simulink 8.4 (R2014b) and Simulink 8.5 (R2015a)?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Apr 2015
Double-clicking a Scope block for which the window is already open while the simulation is running causes the glitch for a discrete signal. The glitch appears due to a bug with the Scope block in Simulink 8.4 (R2014b) and Simulink 8.5 (R2015a).
There are two workarounds to address this issue:
1) You can switch to the new Time Scope introduced in Simulink 8.5 (R2015a) by clicking the "Try Time Scope" toolbar button on the Scope window.
2) In Simulink 8.4 (R2014b), you can check the "Limit data points to last" option and set the value to a sufficiently large number. You can also do this on the command line using the following commands:
% Select the Scope block
>> limit = 200000; % A sufficiently large value
>> set_param(gcb,'LimitDataPoints','on');
>> set_param(gcb,'MaxDataPoints',limit);
% Update the model to see the changes

More Answers (0)

Products


Release

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!