Main Content

dsp.VariableIntegerDelay

Delay input by time-varying integer number of sample periods

Description

Thedsp.VariableIntegerDelay系统对象由时变intege™延迟输入r number of sample periods.

To delay the input by a time-varying integer number of sample periods:

  1. Create thedsp.VariableIntegerDelayobject and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, seeWhat Are System Objects?

Creation

Description

example

vid= dsp.VariableIntegerDelayreturns a variable integer delay System object,vid, that delays discrete-time input by a time-varying integer number of sample periods.

vid= dsp.VariableIntegerDelay(Name,Value)returns a variable integer delay System object with each specified property set to the specified value.

Properties

expand all

Unless otherwise indicated, properties arenontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and thereleasefunction unlocks them.

If a property istunable, you can change its value at any time.

For more information on changing property values, seeSystem Design in MATLAB Using System Objects.

Specify the maximum delay the object can produce for any sample. The object clips input delay values greater than theMaximumDelayto theMaximumDelay.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64

Specify the values with which the object's memory is initialized. The dimensions of this property can vary depending on whether you want fixed or time-varying initial conditions.

For anM-by-Nframe-based input matrix U, you can set theInitialConditionsproperty as follows:

  • To specify fixed initial conditions, set theInitialConditionsproperty to a scalar value. The object initializes every sample of every channel in memory using the value you specify.

  • To specify different time-varying initial conditions for each channel, set theInitialConditionsproperty to an array of size 1-by-N-by-D, whereDis the value of theMaximumDelayproperty.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64

Usage

Description

example

vidOut= vid(input,d)delays the input bydsamples, wheredshould be less than or equal to the value specified in theMaximumDelayproperty and greater than or equal to 0. Delay values outside this range are clipped appropriately and non-integer delays are rounded to the nearest integer values. Each column of the input is treated as an independent channel

Input Arguments

expand all

Data input, specified as a vector or matrix.

This object supports variable-size input signal. That is, you can change the input frame size (number of rows) even after calling the algorithm. However, the number of channels (number of columns) must remain constant.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|fi
Complex Number Support:Yes

Delay input, specified as a scalar, vector, or matrix. The delay is an integer value.

For anM1or a 1-by-Ndata input vector, the delay can be a:

  • Scalar

  • Vector –– The length and the orientation of the delay vector match the length and the orientation of the data input.

For anM-by-Nmatrix data input, the delay can be a:

  • Column vector –– The length of the vector isM.

  • Row vector –– The length of the vector isN.

  • Matrix –– Delay must be anM-by-Nmatrix.

The dimensions of the delay signal can change according to the supported dimensions listed in the table. The table also shows how delay signal is applied to the input signal.

Data Input Delay Input Output Effect of Delay Input on Data Input
M1(one channel with frame size equal toM) scalar M1 One delay value applied to the input channel
M1(one channel with frame size equal toM) M1 M1 Delay value varies within the frame from sample to sample
1-by-N(Nchannels with frame size equal to 1) scalar 1-by-N One delay value applied to all theNchannels
1-by-N(Nchannels with frame size equal to 1) 1-by-N 1-by-N Unique delay value for each input channel
M-by-N(Nchannels with frame size equal toM) scalar M-by-N One delay value applied to all input channels
M-by-N(Nchannels with frame size equal toM) 1-by-N M-by-N Unique delay value for each input channel
M-by-N(Nchannels with frame size equal toM) M1 M-by-N Delay value varies within the frame from sample to sample. Same set of delay values for all channels.
M-by-N(Nchannels with frame size equal toM) M-by-N M-by-N Unique delay value for each element in the matrix

Example:[2 3 4 5]

Example:[2;3;4;5]

Example:[5]

Data Types:single|double|int8|int16|int32|uint8|uint16|uint32

Output Arguments

expand all

Delayed output, returned as a vector or matrix. The size, data type, and complexity of the output match the size, data type, and complexity of the data input,input.

The table shows how the data input and delay input dimensions affect the output dimensions:

Data Input Delay Input Output Effect of Delay Input on Data Input
M1(one channel with frame size equal toM) scalar M1 One delay value applied to the input channel
M1(one channel with frame size equal toM) M1 M1 Delay value varies within the frame from sample to sample
1-by-N(Nchannels with frame size equal to 1) scalar 1-by-N One delay value applied to all theNchannels
1-by-N(Nchannels with frame size equal to 1) 1-by-N 1-by-N Unique delay value for each input channel
M-by-N(Nchannels with frame size equal toM) scalar M-by-N One delay value applied to all input channels
M-by-N(Nchannels with frame size equal toM) 1-by-N M-by-N Unique delay value for each input channel
M-by-N(Nchannels with frame size equal toM) M1 M-by-N Delay value varies within the frame from sample to sample. Same set of delay values for all channels.
M-by-N(Nchannels with frame size equal toM) M-by-N M-by-N Unique delay value for each element in the matrix

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|fi
Complex Number Support:Yes

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object namedobj, use this syntax:

release(obj)

expand all

step RunSystem objectalgorithm
release Release resources and allow changes toSystem objectproperty values and input characteristics
reset Reset internal states ofSystem object

例子

collapse all

Note: If you are using R2016a or an earlier release, replace each call to the object with the equivalent step syntax. For example,obj(x)becomesstep(obj,x).

Delay a signal by a varying number of integer sample periods.

vid = dsp.VariableIntegerDelay; yout = zeros(100,1); x = (1:100).';fork=1:10 range = (k-1)*10+1:k*10; yout(range) = vid(x(range),k);endstem(x,'b') holdon; stem(yout,'r') legend('Original Signal','Variable Integer Delayed Signal')

Figure contains an axes object. The axes object contains 2 objects of type stem. These objects represent Original Signal, Variable Integer Delayed Signal.

Algorithms

This object implements the algorithm, inputs, and outputs described on theVariable Integer Delay(Simulink)block reference page.

Extended Capabilities

Version History

Introduced in R2012a