Returns the diagonal elements of a square matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rp), | intent(in), | dimension(:,:) | :: | mat | (n,n) array |
|
real(kind=rp), | intent(out), | dimension(:) | :: | d | (n,) array; contains the entries of the main diagonal |