aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/examples/QuickStart_example2_fixed.cpp
blob: 6d7d63d15edba327de4731b38081aed1eb0ffe14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
#include <Eigen/Dense>

using Eigen::Matrix3d;
using Eigen::Vector3d;

int main(int, char *[])
{
  Matrix3d m;
  for (int rowIndex = 0; rowIndex < 3; ++rowIndex)
    for (int columnIndex = 0; columnIndex < 3; ++columnIndex)
      m(rowIndex, columnIndex) = rowIndex + 0.01 * columnIndex;
  Vector3d v = Vector3d::Ones();
  std::cout << m * v << std::endl;
}