This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


End-of-file status for signal reader object





isDone(src) returns a logical value indicating whether or not the SignalSource object, src, has reached the end of the imported signal. If the SignalEndAction property of src is set to Cyclic repetition, this method returns true every time the reader reaches the end.


collapse all

Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent step syntax. For example, myObject() becomes step(myObject).

Create a signal source to output one sample at a time.

src1 = dsp.SignalSource;
src1.Signal = randn(1024,1);
y1 = zeros(1024,1);
idx = 1;
    y1(idx) = src1();
    idx = idx + 1;

Create a signal source to output vectors.

src2 = dsp.SignalSource(randn(1024,1),128);
y2 = src2(); % y2 is a 128-by-1 frame of samples

Input Arguments

collapse all

Signal reader object, specified as a dsp.SignalSource System object.

See Also

System Objects

Introduced in R2012b