Simulink Reference |
 |
Reshape
Change the dimensionality of a signal
Library
Math Operations
Description

The Reshape block changes the dimensionality of the input signal to a dimensionality that you specify, using the block's Output dimensionality parameter. For example, you can use the block to change an N-element vector to a 1-by-N or N-by-1 matrix signal, and vice versa.
The Output dimensionality parameter lets you select any of the following output options.
Output Dimensionality
|
Description
|
1-D array
|
Converts a matrix (2-D array) to a vector (1-D array) array signal. The output vector consists of the first column of the input matrix followed by the second column, etc. (This option leaves a vector input unchanged.)
|
Column vector
|
Converts a vector or matrix input signal to a column matrix, i.e., an M-by-1 matrix, where M is the number of elements in the input signal. For matrices, the conversion is done in column-major order.
|
Row vector
|
Converts a vector or matrix input signal to a row matrix, i.e., a 1-by-N matrix where N is the number of elements in the input signal. For matrices, the conversion is done in column-major order.
|
Customize
|
Converts the input signal to an output signal whose dimensions you specify, using the Output dimensions parameter. The value of the Output dimensions parameter can be a one- or two-element vector. A value of [N] outputs a vector of size N. A value of [M N] outputs an M-by-N matrix. The number of elements of the input signal must match the number of elements specified by the Output dimensions parameter. For matrices, the conversion is done in column-major order.
|
Data Type Support
The Reshape block accepts and outputs signals of any data type, including fixed-point data types, except int64
and uint64
.
Parameters and Dialog Box

- Output dimensionality
- The dimensionality of the output signal.
- Output dimensions
- Specifies a custom output dimensionality. This option is enabled only if you select Customize as the value of the Output dimensionality parameter.
Characteristics
Direct Feedthrough
|
Yes
|
Sample Time
|
Inherited from driving block
|
Scalar Expansion
|
N/A
|
Dimensionalized
|
Yes
|
Zero Crossing
|
No
|
| Repeating Sequence | | Rounding Function |  |