source: pacpussensors/trunk/Vislab/lib3dv/eigen/doc/examples/tut_matrix_coefficient_accessors.cpp@ 136

Last change on this file since 136 was 136, checked in by ldecherf, 7 years ago

Doc

File size: 343 bytes
Line 
1#include <iostream>
2#include <Eigen/Dense>
3
4using namespace Eigen;
5
6int main()
7{
8 MatrixXd m(2,2);
9 m(0,0) = 3;
10 m(1,0) = 2.5;
11 m(0,1) = -1;
12 m(1,1) = m(1,0) + m(0,1);
13 std::cout << "Here is the matrix m:\n" << m << std::endl;
14 VectorXd v(2);
15 v(0) = 4;
16 v(1) = v(0) - 1;
17 std::cout << "Here is the vector v:\n" << v << std::endl;
18}
Note: See TracBrowser for help on using the repository browser.