Go to the documentation of this file.00001 #include <Eigen/Dense>
00002 #include <iostream>
00003
00004 using namespace Eigen;
00005 using namespace std;
00006
00007 int main()
00008 {
00009 MatrixXf m(2,2);
00010 MatrixXf n(2,2);
00011 MatrixXf result(2,2);
00012
00013 m << 1,2,
00014 3,4;
00015 n << 5,6,
00016 7,8;
00017
00018 result = (m.array() + 4).matrix() * m;
00019 cout << "-- Combination 1: --" << endl << result << endl << endl;
00020 result = (m.array() * n.array()).matrix() * m;
00021 cout << "-- Combination 2: --" << endl << result << endl << endl;
00022 }