aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/MatrixBase_fixedBlock_int_int.cpp
blob: 984fd7094c9deaa03cfb7a2d417ecb2e06bde568 (plain)
1
2
3
4
5
Matrix4d m = Vector4d(1,2,3,4).asDiagonal();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is m.fixedBlock<2, 2>(2, 2):" << endl << m.fixedBlock<2, 2>(2, 2) << endl;
m.fixedBlock<2, 2>(2, 0) = m.fixedBlock<2, 2>(2, 2);
cout << "Now the matrix m is:" << endl << m << endl;