Reshape
Changes the dimensionality of a vector or matrix signal.
Description
Block Reshape changes the dimension of the input signal to the dimension specified by the parameters Output dimensionality.
For example, you can convert a vector of length into a matrix of dimension 1 by or by 1.
Ports
Input
#
IN_1
—
input signal
scalar
| vector
| matrix
| n-dimensional signal
Details
Input signal whose dimensions will be changed based on the Output dimensionality parameters.
Data types |
|
Complex numbers support |
Yes |
#
Ref
—
output dimension
scalar
| vector
| matrix
| n-dimensional signal
Details
Output signal dimensionality.
Dependencies
To use this port, set parameters Output dimensionality value Derive from reference input port
.
Data types |
|
Complex numbers support |
Yes |
Output
#
OUT_1
—
output signal
scalar
| vector
| matrix
| n-dimensional signal
Details
Output signal with dimensions specified by the Output dimensionality parameters.
Data types |
|
Complex numbers support |
Yes |
Parameters
Main
#
Output dimensionality —
output dimension
1-D array
| Column vector (2-D)
| Row vector (2-D)
| Customize
| Derive from reference input port
Details
The dimension of the output signal. Options for selection:
-
1-D array
- converts a vector, matrix, or multidimensional array to a vector (one-dimensional array). The output vector consists of the first column of the input matrix, followed by the second column, and so on (this option leaves the vector input signal unchanged). -
Column vector (2-D)
- converts a vector, matrix or multidimensional input signal into a column matrix of size by 1, where 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 by the first dimension. -
Row vector (2-D)
- converts a vector, matrix or multidimensional input signal into a matrix-row of size 1 by , where 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 by the first dimension. -
Customize
- converts the input signal into the output signal, the dimensions of which are set by the parameters Output dimensions. -
Derive from reference input port
- converts the input signal into an output signal whose dimensions are input to the Ref input port.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Output dimensions —
output dimension
Tuple of Int64
Details
Dimensions for the output signal:
-
(N,)
- for a vector output signal the parameter is specified as a tuple of one element defining the number of elements of the input vector. -
(N, M)
- for a matrix or multidimensional output signal, the parameter is specified as a tuple of n elements. The number of elements of the input signal must correspond to the number of elements specified by the value of the parameters in the input signal. In 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.
Dependencies
To use this parameter, set parameter Output dimensionality value Customize
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |