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

12 lines
266 B
C++
Raw Normal View History

2024-10-21 16:42:03 -04:00
RowVectorXd vec1(3);
vec1 << 1, 2, 3;
std::cout << "vec1 = " << vec1 << std::endl;
RowVectorXd vec2(4);
vec2 << 1, 4, 9, 16;
std::cout << "vec2 = " << vec2 << std::endl;
RowVectorXd joined(7);
joined << vec1, vec2;
std::cout << "joined = " << joined << std::endl;