Main Content

isDone

End-of-file status for signal reader object

Description

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.

example

Examples

collapse all

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;
while(~isDone(src1))
    y1(idx) = src1();
    idx = idx + 1;
end

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.

Version History

Introduced in R2012b

See Also

Objects