End-of-file status for signal reader object
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; 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