Rev | Line | |
---|
[136] | 1 | #include <Eigen/Dense>
|
---|
| 2 | #include <iostream>
|
---|
| 3 |
|
---|
| 4 | using namespace Eigen;
|
---|
| 5 | using namespace std;
|
---|
| 6 |
|
---|
| 7 | int main(int, char**)
|
---|
| 8 | {
|
---|
| 9 | cout.precision(3);
|
---|
| 10 | ArrayXXf table(10, 4);
|
---|
| 11 | table.col(0) = ArrayXf::LinSpaced(10, 0, 90);
|
---|
| 12 | table.col(1) = M_PI / 180 * table.col(0);
|
---|
| 13 | table.col(2) = table.col(1).sin();
|
---|
| 14 | table.col(3) = table.col(1).cos();
|
---|
| 15 | std::cout << " Degrees Radians Sine Cosine\n";
|
---|
| 16 | std::cout << table << std::endl;
|
---|
| 17 |
|
---|
| 18 | return 0;
|
---|
| 19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.