Delay input by specified number of samples or frames
Note: Certain features of this object will be removed in future releases. See Functionality being removed or replaced for blocks and System objects.
The Delay object delays an input by a specified number of samples or frames.
To delay an input by a specified number of samples or frames:
H = dsp.Delay returns a delay object, H, to delay the input by one sample.
H = dsp.Delay('PropertyName', PropertyValue, ...) returns a delay object, H, with each property set to the specified value.
H = dsp.Delay(LEN,'PropertyName',PropertyValue, ...) returns a delay object, H, with the Length property set to LEN and other specified properties set to the specified values.
Delay units as samples or frames
Specify the delay units as one of | Samples | Frames |. This property applies when you set the FrameBasedProcessing property to true. The default is Samples.
Amount of delay
Specify amount of delay to apply to the input signal. You can set this property to a scalar, a vector, or an array containing nonnegative integers depending on the value of the FrameBasedProcessing property.
If the FrameBasedProcessing property is false, the value can be a scalar by which to delay all input channels equally, or an N-D array of the same dimensions as the input whose values specify the number of sample intervals to delay each channel of the input.
If the FrameBasedProcessing property is true, the value can be an integer by which to equally delay all channels or a vector whose length equals the number of input columns (channels).
The default is 1.
Enable different initial conditions per channel
Set this property to true to specify different initial conditions per channel. The default value is false.
Enable different initial conditions per sample
Set this property to true to specify different initial conditions per sample. The default value is false.
Initial output of delay object
Specify the initial output(s) of the delay object. You can set this property to a scalar, vector, matrix, or a cell array depending on the values of the FrameBasedProcessing, InitialConditionsPerChannel, InitialConditionsPerSample, and Units properties. The default is 0.
If the FrameBasedProcessing property is false, and the input is an N-D array, the dimensions of this property value have the following requirements:
If the FrameBasedProcessing property is true, and the input is an M-by-N matrix, the dimensions of this property value must be as follows:
Enable resetting delay states
Specify when the delay object should reset the delay states. By default, the value of this property is false, and the object does not reset the delay states. When this property is set to true, a reset control input is provided to the step method, and the ResetCondition property applies. The object resets the delay states based on the values of the ResetCondition property and the reset input to the step method.
Reset trigger setting for delay
Specify the event to reset the delay as one of | Rising edge | Falling edge | Either edge | Non-zero |. The delay object resets the delay based on the values of this property and the reset input to the step method. This property applies when you set the ResetInputPort property to true. The default is Non-zero.
Enable frame-based processing
Set this property to true to enable frame-based processing. Set this property to false to enable sample-based processing. The default is true.
|clone||Create delay object with same property values|
|getNumInputs||Number of expected inputs to step method|
|getNumOutputs||Number of outputs of step method|
|isLocked||Locked status for input attributes and nontunable properties|
|release||Allow property value and input characteristics changes|
|reset||Reset delay states|
|step||Apply delay to input|
Delay input by five samples:
hdelay1 = dsp.Delay(5); % Output is [0 0 0 0 0 1 2 3 4 5]' y = step(hdelay1, (1:10)');
Delay input by one frame:
hdelay2 = dsp.Delay; hdelay2.Units = 'Frames'; hdelay2.Length = 1; % Output is zeros(10,1) y1 = step(hdelay2, (1:10)'); % Output is (1:10)' y2 = step(hdelay2, (11:20)');
This object implements the algorithm, inputs, and outputs described on the Delay block reference page. The object properties correspond to the block parameters.
Both this object and its corresponding block let you specify whether to process inputs as individual samples or as frames of data. The object uses the FrameBasedProcessing property. The block uses the Input processing parameter. See Set the FrameBasedProcessing Property of a System object for more information.