Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

dsp.ArrayVectorMultiplier System object

Multiply array by vector along specified dimension

Description

The ArrayVectorMultiplier object 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. See Construction.

  2. Call step to multiply the array according to the properties of dsp.ArrayVectorMultiplier. The behavior of step is specific to each object in the toolbox.

Note

Starting in R2016b, instead of using the step method 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) and y = obj(x) perform equivalent operations.

Construction

avm = dsp.ArrayVectorMultiplier returns an array-vector multiplication object, avm, that multiplies 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 is 2.

VectorSource

Source of vector

Specify the source of the vector values as one of Input port or Property. The default is Input port.

Vector

Vector to multiply array

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

 Fixed-Point Properties

Methods

stepMultiply array by vector
Common to All System Objects
clone

Create System object with same property values

getNumInputs

Expected number of inputs to a System object

getNumOutputs

Expected number of outputs of a System object

isLocked

Check locked states of a System object (logical)

release

Allow System object property value changes

Examples

expand all

Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent step syntax. For example, myObject(x) becomes step(myObject,x).

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

Algorithms

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

  • The array-vector multiplication object does not have Minimum or Maximum options for data output.

Extended Capabilities

Introduced in R2012a

Was this topic helpful?