DSP Blockset
  Go to block:
    Search    Help Desk 
Permute Matrix    See Also

Reorder the rows or columns of a matrix.

Library

Matrix Functions, in Math Functions

Description

The Permute Matrix block reorders the rows or columns of the input matrix (A) as indicated by the indexing vector (P).

When the Permute parameter is set to Rows, the block uses the rows of A to create a new matrix with the same column dimension. Vector P indicates where each row from A should be placed in the output matrix. The number of rows in the output matrix is determined by the number of elements in P.

As shown below, rows of A can appear any number of times in the output, or not at all.

When the Permute parameter is set to Columns, the block uses the columns of A to create a new matrix with the same row dimension. Vector P indicates where each column from A should be placed in the output matrix. The number of columns in the output matrix is determined by the number of elements in P.

Columns of A can appear any number of times in the output, or not at all.

When an element in the vector P references a non-existent row or column of matrix A, the block reacts with the behavior specified by the Invalid permutation index parameter. The following options are available:

Note
If you expect to generate code for the Permute Matrix block using the Real-Time Workshop, you should ensure that inputs are contiguous in memory. See the Contiguous Copy block for more information.

Dialog Box

Permute
Method of constructing the output matrix; by permuting rows or columns of the input.
Invalid permutation index 
Response to an invalid index value. This parameter is not tunable in Simulink's external mode.
Number of columns in A
Number of columns in the input matrix.

See Also

Submatrix
Transpose
Variable Selector
permute (MATLAB)


[ Previous | Help Desk | Next ]