Main Content

permute

Rearrange array dimensions in model arrays

Description

example

newarray = permute(sysarray,order) rearranges the array dimensions of a model array so that the dimensions are in the specified order. The input and output dimensions of the model array are not counted as array dimensions for this operation.

Examples

collapse all

Create a 1-by-2-by-3 array of state-space models.

sysarr = rss(2,2,2,1,2,3);

Rearrange the model array so that the dimensions are 3-by-2-by-1.

newarr = permute(sysarr,[3 2 1]);
size(newarr)
3x2 array of state-space models.
Each model has 2 outputs, 2 inputs, and 2 states.

The input and output dimensions of the model array remain unchanged.

Input Arguments

collapse all

Model array to rearrange, specified as an array of input-output models such as numeric LTI models, generalized models, or identified LTI models.

Dimensions of rearranged model array, specified as a vector of positive integers. For example, to rearrange a model array into a 3-by-2 array, order is [3 2].

Data Types: double

Output Arguments

collapse all

Rearranged model array, returned as an array of input-output models with the new dimensions as specified in order.

Version History

Introduced in R2013a

See Also

| |