# Convert 1-D to 2-D

(To be removed) Reshape 1-D or 2-D input to 2-D matrix with specified dimensions

The Convert 1-D to 2-D block will be removed in a future release. Use the Reshape (Simulink) block instead. When the block is removed, existing instances of this block will be automatically replaced with the Reshape block.

Libraries:
DSP System Toolbox / Signal Management / Signal Attributes
DSP System Toolbox HDL Support / Signal Management

## Description

The Convert 1-D to 2-D block reshapes a length-Mi 1-D vector or an Mi-by-Ni matrix to an Mo-by-No matrix, where Mo is specified by the Number of output rows parameter and No is specified by the Number of output columns parameter.

y = reshape(u,Mo,No)					% Equivalent MATLAB code

The input is reshaped column-wise, as shown in the two cases below. The length-6 vector and the 2-by-3 matrix are both reshaped to the same 3-by-2 output matrix.

An error is generated when (Mo*No)≠(Mi*Ni). In other words, the total number of input elements must be conserved in the output.

The output is frame based when you select the Frame-based output check box; otherwise, the output is sample based.

## Ports

### Input

expand all

Input signal, specified as a 1-D vector or 2-D matrix.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | fixed point

### Output

expand all

Output signal, returned as a 2-D matrix.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | fixed point

## Parameters

expand all

Number of rows Mo in the output matrix, specified as a positive integer.

Number of columns No in the output matrix, specified as a positive integer.

Select this parameter to create a frame-based output.

## Block Characteristics

 Data Types Boolean | double | fixed point | integer | single Direct Feedthrough no Multidimensional Signals no Variable-Size Signals no Zero-Crossing Detection no

## Version History

Introduced before R2006a

collapse all

### R2023b: Convert 1-D to 2-D block will be removed

The Convert 1-D to 2-D block will be removed in a future release. Use the Reshape (Simulink) block instead. When the block is removed, existing instances of this block will be automatically replaced with the Reshape block.