Create square diagonal matrix from diagonal elements
Math Functions / Matrices and Linear Algebra / Matrix Operations
dspmtrx3
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
Port | Supported Data Types |
---|---|
D |
|
A |
|
Extract Diagonal | DSP System Toolbox™ |
diag | MATLAB® |