Sign in
eigen
/
mirror
/
c21a80be3d0506587e73f7a5796df6e83967a934
/
.
/
doc
/
snippets
/
MatrixBase_diagonal.cpp
blob: c15dcf10455250dce7233b8f809195b08bafe52b [
file
] [
log
] [
blame
]
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
;