Main Content

dsp.ArrayVectorMultiplier

(To be removed) Multiply array by vector along specified dimension

dsp.ArrayVectorMultiplierwill be removed in a future release. Use the.*operator instead. For more information, seeCompatibility Considerations.

Description

TheArrayVectorMultiplierobject multiplies an array by a vector along a specified dimension.

To multiply an array by a vector along a specified:

  1. Define and set up your array-vector multiplication object. SeeConstruction.

  2. Callstepto multiply the array according to the properties ofdsp.ArrayVectorMultiplier. The behavior ofstepis specific to each object in the toolbox.

Note

Starting in R2016b, instead of using thestepmethod to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example,y = step(obj,x)andy = obj(x)perform equivalent operations.

Construction

avm = dsp.ArrayVectorMultiplierreturns an array-vector multiplication object,avm,繁殖an input N-D array by the elements of a vector along the second dimension.

avm = dsp.ArrayVectorMultiplier('PropertyName',PropertyValue,...)returns an array-vector multiplication object,avm, with each property set to the specified value.

Properties

Dimension

Dimension along which to multiply input by vector elements

Specify the dimension along which to multiply the input array by the elements of vector as a positive integer. The default is2.

VectorSource

Source of vector

Specify the source of the vector values as one ofInput portorProperty. The default isInput port.

Vector

Vector to multiply array

Specify the vector by which to multiply the array. This property applies when you set theVectorSourceproperty toProperty. The default is[0.5 0.25]. This property is tunable.

Fixed-Point Properties

Methods

step Multiply array by vector
Common to All System Objects
release

允许cha系统对象属性值nges

Examples

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).

avm = dsp.ArrayVectorMultiplier; a = ones(2); x = [2 3]'; y = avm(a, x)
y =2×22 3 2 3

Algorithms

This object implements the algorithm, inputs, and outputs described on theArray-Vector Multiplyblock reference page. The object properties correspond to the block parameters, except:

  • The array-vector multiplication object does not haveMinimumorMaximumoptions for data output.

Extended Capabilities

Version History

Introduced in R2012a

expand all

Warns starting in R2021b