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

8 lines
272 B
C++
Raw Normal View History

2024-10-21 16:42:03 -04:00
ArrayXXf table(10, 4);
table.col(0) = ArrayXf::LinSpaced(10, 0, 90);
table.col(1) = M_PI / 180 * table.col(0);
table.col(2) = table.col(1).sin();
table.col(3) = table.col(1).cos();
std::cout << " Degrees Radians Sine Cosine\n";
std::cout << table << std::endl;