This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Permute Dimensions

Rearrange dimensions of multidimensional array dimensions

  • Library:
  • Simulink / Math Operations


The Permute Dimensions block reorders the elements of the input signal by permuting its dimensions. You specify the permutation to be applied to the input signal using the Order parameter.

For example, to transpose a 3-by-5 input signal, specify the permutation vector [2 1] for the Order parameter. When you do, the block reorders the elements of the input signal and outputs a 3-by-5 matrix.

You can use an array of buses as an input signal to a Permute Dimensions block. For details about defining and using an array of buses, see Combine Buses into an Array of Buses.



expand all

This port accepts scalar, vector, matrix, and N-dimensional signals of any data type that Simulink® supports, including fixed-point, enumerated, and nonvirtual bus data types.

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


expand all

The block outputs the permutation of the input signal, according to the value of the Order parameter. The output has the same data type as the input.

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


expand all

Specify the permutation order to apply to the dimensions of the input signal. The value of this parameter must be an N-element vector where N is the number of dimensions of the input signal. The elements of the permutation vector must be a rearrangement of the values from 1 to N.

For example, the permutation vector [2 1] applied to a 5-by-3 input signal results in a 3-by-5 output signal, in other words, the transpose of the input signal.

Programmatic Use

Block Parameter: Order
Type: character vector
Value: N-element vector
Default: '[2 1]'

Block Characteristics

Data Types

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

Direct Feedthrough


Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Extended Capabilities

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

PLC Code Generation
Generate Structured Text code using Simulink® PLC Coder™.

Fixed-Point Conversion
Convert floating-point algorithms to fixed point using Fixed-Point Designer™.

Introduced in R2007a