Change dimensionality of signal
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.
Converts a multidimensional 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.)
Converts a vector, matrix, or multidimensional 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. For multidimensional arrays, the conversion is done along the first dimension.
Converts a vector, matrix, or multidimensional 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. For multidimensional arrays, the conversion is done along the first dimension.
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 multi-element vector. A value of
Derive from reference input port
Creates a second input port, Ref, on the block. Derives the dimensions of the output signal from the dimensions of the signal input to the Ref input port. Selecting this option disables the Output dimensions parameter. When you select this parameter, the input signals for both inport ports, U and Ref, must have the same sampling mode (sample-based or frame-based).
The Reshape block accepts and outputs signals of any data type that Simulink® supports, including fixed-point, enumerated, and nonvirtual bus data types.
For more information, see Data Types Supported by Simulink.
You can use an array of buses as an input signal to a Reshape block. For details about defining and using an array of buses, see Combine Buses into an Array of Buses.
Specify the dimensionality of the output signal.
Specify a custom output dimensionality. This parameter is available
only when you set Output dimensionality to
Double | Single | Boolean | Base Integer | Fixed-Point | Enumerated | Bus
Inherited from driving block