COSC-4P80-Assignment-2/lib/eigen-3.4.0/doc/examples/QuickStart_example2_fixed.cpp

16 lines
289 B
C++
Raw Normal View History

2024-10-21 16:42:03 -04:00
#include <iostream>
#include <Eigen/Dense>
using namespace Eigen;
using namespace std;
int main()
{
Matrix3d m = Matrix3d::Random();
m = (m + Matrix3d::Constant(1.2)) * 50;
cout << "m =" << endl << m << endl;
Vector3d v(1,2,3);
cout << "m * v =" << endl << m * v << endl;
}