Sign in
◑
Theme
eigen
/
mirror
/
33e174613987cfc6c83576dc0fe8086c7a5d1b1f
/
.
/
doc
/
snippets
/
MatrixBase_diagonal.cpp
blob: cd63413f37f71b837bccda5508882cc2beefae83 [
file
]
Matrix3i
m
=
Matrix3i
::
Random
();
cout
<<
"Here is the matrix m:"
<<
endl
<<
m
<<
endl
;
cout
<<
"Here are the coefficients on the main diagonal of m:"
<<
endl
<<
m
.
diagonal
()
<<
endl
;