Documentation

dsp.ArrayVectorDivider System object

Divide array by vector along specified dimension

Description

TheArrayVectorDivider对象将数组沿指定的维度划分为向量。

将数组沿指定维度划分为向量:

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

  2. Callstepto divide the array according to the properties ofdsp.ArrayVectorDivider。The behavior ofstepis specific to each object in the toolbox.

不te

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)y = obj(x)perform equivalent operations.

Construction

avd = dsp.ArrayVectorDividerreturns an array-vector division object,avd, that divides an input array by the elements of a vector along the first dimension of the array.

avd = dsp.ArrayVectorDivider('PropertyName',PropertyValue,...)returns an array-vector division object,avd, with each property set to the specified value.

Properties

Dimension

Dimension along which to divide input by vector elements

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

VectorSource

Source of vector

Specify the source of the vector values as |Input port|Property|。The default isInput port

Vector

Vector values

Specify the vector values. This property applies when you set theVectorSourceproperty toProperty。The default is[0.5 0.25]。此属性是可调的。

定点属性

方法

step Divide array by vector
Common to All System Objects
release

Allow System object property value changes

Examples

expand all

不te:此示例仅在R2016B或更高版本中运行。如果您使用的是较早的版本,请用等效替换每个呼叫对函数的调用stepsyntax. For example, myObject(x) becomes step(myObject,x).

avd = dsp.ArrayVectorDivider;a =一个(2)
a =2×21 1 1 1
x = [2 3]'
x =2×12 3
y = avd(a, x)
y =2×20.5000 0.5000 0.3333 0.3333

Algorithms

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

The array-vector division object does not haveMinimum或者Maximum数据输出的选项。

Extended Capabilities

Introduced in R2012a

Was this topic helpful?