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

Generate a square, diagonal matrix.

Library

Matrix Functions, in Math Functions; DSP Sources

Description

The Constant Diagonal Matrix block outputs a square diagonal matrix constant. The Number of rows in matrix parameter sets the matrix size, and the Constant along diagonal parameter determines the values along the matrix diagonal. This parameter can be a scalar to be repeated for all elements along the diagonal, or a vector containing the values of the diagonal elements. To generate the identity matrix, set the Constant along diagonal to 1.

If the vector specified for the Constant along diagonal parameter is larger than the specified number of rows in the matrix, the extra values at the end of the vector are ignored. If the vector contains fewer values than there are diagonal elements, the vector is padded with the correct number of zeros.

Dialog Box

Number of rows in matrix
The number of rows (and columns) in the square matrix output.
Constant(s) along diagonal 
The values of the elements along the diagonal, as a scalar or vector.

See Also

Create Diagonal Matrix
Matrix Constant
diag (MATLAB)


[ Previous | Help Desk | Next ]