DSP Blockset
  Go to block:
    Search    Help Desk 
Extract Diagonal    See Also

Create a vector from the elements of a matrix diagonal.

Library

Matrix Functions, in Math Functions

Description

The Extract Diagonal block creates a vector from the diagonal of a matrix input. The diagonal elements of an M-by-N matrix input are used to populate the output vector, which has a length of min(M,N). The Number of columns in A parameter specifies the number of columns, N, in the input matrix. A setting of -1 indicates that the input is square.

Note
If you expect to generate code for the Extract Diagonal 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

Number of columns in A
The number of columns in the input matrix. A value of -1 indicates that the input is square.

See Also

Constant Diagonal Matrix
Create Diagonal Matrix
Extract Triangular Matrix


[ Previous | Help Desk | Next ]