tut_matrix_coefficient_accessors.cpp File Reference

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 4 of file tut_matrix_coefficient_accessors.cpp.

5 {
6  Eigen::MatrixXd m(2,2);
7  m(0,0) = 3;
8  m(1,0) = 2.5;
9  m(0,1) = -1;
10  m(1,1) = m(1,0) + m(0,1);
11  std::cout << "Here is the matrix m:\n" << m << std::endl;
12  Eigen::VectorXd v(2);
13  v(0) = 4;
14  v(1) = v(0) - 1;
15  std::cout << "Here is the vector v:\n" << v << std::endl;
16 }
Matrix3f m
Array< int, Dynamic, 1 > v
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:182