mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add snippet for sub/super diagonal
fix a few doc issues
This commit is contained in:
5
doc/snippets/MatrixBase_diagonal_int.cpp
Normal file
5
doc/snippets/MatrixBase_diagonal_int.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
Matrix4i m = Matrix4i::Random();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:" << endl
|
||||
<< m.diagonal<1>().transpose() << endl
|
||||
<< m.diagonal<-2>().transpose() << endl;
|
||||
Reference in New Issue
Block a user