Documentation Center

  • Trials
  • Product Updates

Squeeze

Remove singleton dimensions from multidimensional signal

Library

Math Operations

Description

The Squeeze block removes singleton dimensions from its multidimensional input signal. A singleton dimension is any dimension whose size is one. The Squeeze block operates only on signals whose number of dimensions is greater than two. Scalar, one-dimensional (vector), and two-dimensional (matrix) signals pass through the Squeeze block unchanged.

Data Type Support

The Squeeze block accepts input signals of any dimension and of any data type that Simulink® supports, including fixed-point and enumerated data types. For more information, see Data Types Supported by Simulink in the Simulink documentation.

Parameters and Dialog Box

Examples

In the following modelmodel, the Squeeze block converts a multidimensional array of size 3-by-1-by-2 into a 3-by-2 signal:

Because the Constant block supplies a signal with random values to the Squeeze block, the values in the Display block vary from simulation to simulation.

Characteristics

Direct Feedthrough

Yes

Sample Time

Inherited from the driving block

Scalar Expansion

N/A

Dimensionalized

Yes

Multidimensionalized

Yes

Zero-Crossing Detection

No

See Also

Reshape

Was this topic helpful?