2
0
mirror of https://gitlab.com/libeigen/eigen.git synced 2025-03-01 18:26:24 +08:00
eigen/doc/snippets/MatrixBase_segment_int_int.cpp

6 lines
244 B
C++
Raw Normal View History

2008-09-13 18:44:23 +08:00
RowVector4i v = RowVector4i::Random();
cout << "Here is the vector v:" << endl << v << endl;
cout << "Here is v.segment(1, 2):" << endl << v.segment(1, 2) << endl;
v.segment(1, 2).setZero();
cout << "Now the vector v is:" << endl << v << endl;