Main Content

Convert 2-D to 1-D

(To be removed) Convert 2-D matrix input to 1-D vector

The Convert 2-D to 1-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.

  • Convert 2-D to 1-D block

Libraries:
DSP System Toolbox / Signal Management / Signal Attributes

Description

The Convert 2-D to 1-D block reshapes an M-by-N matrix input to a 1-D vector that has a length of M*N.

y = u(:)					% Equivalent MATLAB code 

The input is reshaped column-wise for a 3-by-2 matrix.

Ports

Input

expand all

Input signal, specified as a 2-D matrix.

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

Output

expand all

Output signal, returned as a 1-D vector.

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

Block Characteristics

Data Types

Boolean | double | enumerated | fixed point | integer | single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Version History

Introduced before R2006a

collapse all

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

The Convert 2-D to 1-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.

See Also

Blocks