| DSP Blockset | Search  Help Desk |
| Constant Diagonal Matrix | See Also |
Generate a square, diagonal matrix.
Library
Matrix Functions, in Math Functions; DSP SourcesDescription
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 to1.
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


See Also
Create Diagonal Matrixdiag (MATLAB)