This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


System object: dsp.TimeScope
Package: dsp

Reset internal states of time scope object




reset(scope) sets the internal states of the TimeScope object scope to their initial values.

You should call the reset method after calling the step method when you want to clear the Time Scope figure displays, prior to releasing system resources. This action enables you to start a simulation from the beginning. When you call the reset method, the displays will become blank again. In this sense, its functionality is similar to that of the MATLAB® clf function. Do not call the reset method after calling the release method.


View a sine wave on the time scope. When you finish the simulation, pause for 5 seconds and then reset the screen. Then, view a different sine wave on the same time scope.

sinSignal1 = dsp.SineWave('Frequency', 100, 'SampleRate', 1000, 'SamplesPerFrame', 10);
sinSignal2 = dsp.SineWave('Frequency', 50, 'SampleRate', 1000, 'SamplesPerFrame', 10);

scope = dsp.TimeScope('SampleRate', sinSignal1.SampleRate,'TimeSpan', 0.1);
for ii = 1:10
     x = step(sinSignal1);
     step(singSignal2, x);

% Pause and then reset internal states

for ii = 1:10
     x = step(sinSignal1);
     step(sinSignal2, x);



In operation, the reset method is similar to a consecutive execution of the mdlTerminate function and the mdlInitializeConditions function.

Was this topic helpful?