DSP Blockset | ![]() ![]() |
Create a square diagonal matrix from diagonal elements.
Library
Math Functions / Matrices and Linear Algebra / Matrix Operations
Description
The Create Diagonal Matrix block populates the diagonal of the M-by-M matrix output with the elements contained in the length-M vector input, D
. The elements off the diagonal are zero.
A = diag(D) Equivalent MATLAB code
The output is always sample-based.
Dialog Box
See Also
Constant Diagonal Matrix |
DSP Blockset |
Extract Diagonal |
DSP Blockset |
diag |
MATLAB |
![]() | Covariance Method | Cumulative Sum | ![]() |