Engee documentation

Reshape

Changes the dimensionality of a vector or matrix signal.

reshape

Description

The Reshape block changes the dimensionality of the input signal to the dimensionality specified by the Output dimensionality parameter.

For example, you can convert a vector of length N to a matrix of size 1 by N or N by 1.

Ports

Input

Port_1 - input signal
scalar | vector | matrix

Input signal whose dimensions will be changed based on the Output dimensionality parameter.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Support for complex numbers: Yes

Output

Port_1 - output signal
scalar | vector | matrix

Output signal with dimensions specified by the Output dimensionality parameter.

Data types: Float64.

Parameters

Output Dimensionality - dimensionality of the output signal
Column vector (by default) | Row vector | Customize

Output dimensionality.

Output dimension Description

Column vector.

Converts a vector, matrix or multidimensional input signal into a column matrix of size M by 1, where M is the number of elements in the input signal. For matrices, the conversion is performed in column order. For multidimensional arrays, the transformation is performed on the first dimension.

Row vector.

Converts a vector, matrix, or multidimensional input signal into a row matrix of size 1 by N, where N is the number of elements in the input signal. For matrices, the conversion is performed in column order. For multidimensional arrays, the conversion is performed on the first dimension.

Customise.

Converts the input signal into an output signal, the dimensions of which are customised by the Output Dimensions parameter.

Output Dimensions - dimensions of the output signal
(1,1) (by default).

Dimensions for the output signal.

  • (N) - for vector output signal the parameter is set as a scalar defining the number of elements of the output vector.

  • (N, M) - for matrix output signal the parameter is set as a vector defining the number of rows and columns of the output matrix. The value of the parameter must correspond to the number of elements in the input signal. In the case of matrix signals, the data are selected from the columns of the input matrix and sequentially entered into the columns of the output matrix.

Additional options

C code generation: Yes