You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5 lines
226 B

  1. RowVector4i v = RowVector4i::Random();
  2. cout << "Here is the vector v:" << endl << v << endl;
  3. cout << "Here is v.head(2):" << endl << v.head(2) << endl;
  4. v.head(2).setZero();
  5. cout << "Now the vector v is:" << endl << v << endl;