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.
14 lines
348 B
14 lines
348 B
#include <Eigen/Dense>
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
Eigen::ArrayXf v(6);
|
|
v << 1, 2, 3, 4, 5, 6;
|
|
cout << "v.head(3) =" << endl << v.head(3) << endl << endl;
|
|
cout << "v.tail<3>() = " << endl << v.tail<3>() << endl << endl;
|
|
v.segment(1,4) *= 2;
|
|
cout << "after 'v.segment(1,4) *= 2', v =" << endl << v << endl;
|
|
}
|
|
|