Engee documentation

Array-Vector Subtract

Subtracts vector elements from array elements along the specified dimension.

array vector subtract

Description

Block Array-Vector Subtract subtracts the values in the input vector V from the values of the n-dimensional input array A in the given dimension.

The length of the input V must be the same as the length of the given dimension A. The block Array-Vector Subtract subtracts each element of V from the corresponding element of A.

Consider a three-dimensional input array A (i, j, k) of size M by N by P and an input vector V of size N by 1. If the Subtract along dimension parameter is set to 2, the output of the block is Y(i,j,k):

,

where:

The output of the block Array-Vector Subtract has the same size as the input array A. This block supports valid and complex input data.

Ports

Input

A - input array
vector | matrix

Input array; vector or matrix.

Data types: Float64

V - input vector
vector | matrix

Input vector.

Dependencies

This port is used only when you set the Vector (V) source parameters to Input port.

Data types: Float64

Output

Port_1 - output array
vector | matrix

Block output; vector or matrix.

Data types: Float64

Parameters

Subtract along dimension - dimension for subtraction
1 (by default) | positive number

Specifies the dimension along which to subtract the elements of the vector V from the elements of the input array A.

Data types: Float64

Vector (V) source - vector source
Input port (by default) | `Dialog parameter `

Set the source of the vector V.

  • Input port - the vector is taken from the input port.

  • Dialog parameter - the vector is taken from the dialogue parameter Vector (V).

Vector (V) - vector
[0.5 0.25] (by default) | vector.

Sets the vector V.

Dependencies

This parameter is only used when the Dialog parameter value of the Vector (V) source parameter is selected.

Data types: Float64