COSC-4P80-Assignment-2/lib/eigen-3.4.0/doc/snippets/Tutorial_commainit_01b.cpp

6 lines
113 B
C++
Raw Normal View History

2024-10-21 16:42:03 -04:00
Matrix3f m;
m.row(0) << 1, 2, 3;
m.block(1,0,2,2) << 4, 5, 7, 8;
m.col(2).tail(2) << 6, 9;
std::cout << m;