Delay input signal by fixed samples
Note
The Units
property no longer supports the
'Frames'
option. Use 'Samples'
instead. The
InitialConditions
property no longer supports a cell array format.
Use a Length
-by-numChans
matrix instead, where
numChans
is the number of input channels. For more details, see Compatibility Considerations.
The dsp.Delay
System object™ delays the input by a specified number of samples along each channel (column) of
the input. You can specify the initial output of the object through the InitialConditions property. To reset the delay, enable the
ResetCondition through the ResetInputPort.
To delay the input:
Create the dsp.Delay
object and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
creates a System object that delays the input by 1 sample.delay
= dsp.Delay
creates a delay System object with each specified property set to the specified value. Enclose each
property name in single quotes.delay
= dsp.Delay(Name,Value
)
delay =
dsp.Delay('InitialConditionsPerChannel',true);
creates a delay System object, delay
= dsp.Delay(len,Name,Value
)delay
, with the Length
property
set to len
, and other specified properties set to the specified values.
Enclose each property name in single quotes.
delay = dsp.Delay(10,'ResetInputPort',true,'ResetCondition','Rising
edge');
adds delay to the data input and selectively resets the state of the System object based on the value of the reset input and the value of the ResetCondition property.delayOut
= delay(dataInput
,resetInput
)
To pass the reset input, set ResetInputPort property to
true
.
delay = dsp.Delay('ResetInputPort',true); ... delayOut = delay(dataInput,resetInput);
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)