(To be removed) Add array to vector along specified dimension
dsp.ArrayVectorAdder will be removed in a future release. Use the
+ operator instead. For more information, see Compatibility Considerations.
ArrayVectorAdder object adds an N-D array to a
vector along a specified dimension. The length of the vector must equal the size of the
N-D array along the specified dimension.
To add an N-D array to a vector along a specified dimension:
Starting in R2016b, instead of using the
method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For
y = step(obj,x) and
y = obj(x)
perform equivalent operations.
ava = dsp.ArrayVectorAdder returns an array-vector addition
ava, that adds a vector to an N-D array along
the first dimension.
ava = dsp.ArrayVectorAdder('
returns an array-vector addition object,
each property set to the specified value.
Dimension along which to add vector elements to input
Specify the dimension along which to add the input array to the elements
of the vector as a positive integer. The length of the vector must match the
size of the N-D array along the specified dimension. The default is
Source of vector
Specify the source of the vector values as |
Specify the vector values. This property applies only when you set the
|step||Add vector to N-D array|
|Common to All System Objects|
Allow System object property value changes
If you are using R2016a or an earlier release, replace each call to
the object with the equivalent step syntax. For example,
Add a 2-by-1 vector to a 2-by-2 matrix along the first dimension of the array.
ava = dsp.ArrayVectorAdder; a = ones(2); x = [1 2]'; y = ava(a, x);
This object implements the algorithm, inputs, and outputs described on the Array-Vector Add block reference page. The object properties correspond to the block parameters, except:
|The array-vector addition object does not have Minimum or Maximum options for data output.|
dsp.ArrayVectorAdderSystem object will be removed
Not recommended starting in R2021a
System object will be removed in a future release. Use the
This table shows how the System object is typical used and explains how to update existing code to use the
|Discouraged Usage||Recommended Replacement|
ava = dsp.ArrayVectorAdder; a = ones(2); x = [1 2]'; y = ava(a, x)
y = 2×2 2 2 3 3
you are using a release prior to R2016b, replace
y = a + x
y = 2×2 2 2 3 3
Usage notes and limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).