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.SineWave
Package: dsp

Reset sine wave to the beginning




reset(H) resets the sine wave object to the beginning (n=0). If you invoke the step method without first invoking the reset method, the sine wave object generates additional samples of the original sinusoid. As an example:

H = dsp.SineWave('Amplitude',1,'Frequency',1/4,'SamplesPerFrame',7);
% 7 samples of a sine wave with frequency of 1/4 Hz
y = step(H);
% Call step method without reset
y1 = step(H);
stem([y; y1])
% y1 is a continuation of y
% Now reset
y2 = step(H);
% y2 starts at n=0 and equals y

Was this topic helpful?