DSP Blockset | ![]() ![]() |
Extract the main diagonal of the input matrix.
Library
Math Functions / Matrices and Linear Algebra / Matrix Operations
Description
The Extract Diagonal block populates the 1-D output vector with the elements on the main diagonal of the M-by-N input matrix A
.
D = diag(A) Equivalent MATLAB code
The output vector has length min(M,N)
, and is always sample-based.
Dialog Box
See Also
Constant Diagonal Matrix |
DSP Blockset |
Create Diagonal Matrix |
DSP Blockset |
Extract Triangular Matrix |
DSP Blockset |
diag |
MATLAB |
![]() | Event-Count Comparator | Extract Triangular Matrix | ![]() |