Rebuffer sequence of inputs with one-sample shift
DelayLine object rebuffers a sequence of
inputs with one-sample shift.
To rebuffer a sequence of inputs with one-sample shift:
Starting in R2016b, instead of using the
to perform the operation defined by the System
object™, you can
call the object with arguments, as if it were a function. For example,
= step(obj,x) and
y = obj(x) perform
dline = dsp.DelayLine returns
a delay line System
dline, that buffers
the input samples into a sequence of overlapping or underlapping matrix
dline = dsp.DelayLine(' returns
a delay line System
dline, with each
specified property set to the specified value.
dline = dsp.DelayLine(DELAYSIZE,INITIAL,'
returns a delay line System
dline, with the
Length property set to
InitialConditions property set to
INITIAL and other specified properties set to the specified
Number of rows in output matrix
Specify the number of rows in the output matrix as a scalar
positive integer. The default is
Initial delay line output
Set the value of the object's initial output as one of |
For vector outputs, the following selections apply for the
For matrix outputs, the following selections apply for the
The default is
Enable passing input data to output without extra frame delay
When you set this property to
Enable selective output linearization
The object internally uses a circular buffer, even though the
output is linear. To obtain a valid output, the object must linearize
the circular buffer. When this property is
Hold previous valid value for invalid output
If you set this property to
|reset||Reset internal states of delay line object|
|step||Delayed version of input|
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(x) becomes step(myObject,x).
Use a delay line object with a delay line size of 4 samples.
delayline = dsp.DelayLine( ... 'Length', 4, ... 'DirectFeedthrough', true, ... 'InitialConditions', -2, ... 'EnableOutputInputPort', true, ... 'HoldPreviousValue', true); en = logical([1 1 0 1 0]); y = zeros(4,5); for ii = 1:5 y(:,ii) = delayline(ii, en(ii)); end display(y);
y = -2 -2 -2 1 1 -2 -2 -2 2 2 -2 1 1 3 3 1 2 2 4 4
This object implements the algorithm, inputs, and outputs described on the Delay Line block reference page. The object properties correspond to the block properties, except as noted.
This object processes inputs as separate channels (frames).
The corresponding block has a temporary Treat Mx1 and unoriented
sample-based signals as parameter with a
channel option for frame-based behavior and an
channels option for sample-based behavior. See the Delay
Line block reference page for more information.
Usage notes and limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).