I am using Eigen library with Arduino Mega 2560. I am creating dynamic matrices using Eigen library but it either returns nothing or the matrix itself.
#include <stlport.h>
#include <Eigen30.h>
#include <Eigen/LU>
#include <Eigen/Dense>
Eigen::MatrixXd b, c;
void setup() {
Serial.begin(9600);
Eigen::MatrixXd a;
for(int i=0; i < 4; i++){
for(int j=0; j < 4;j++){
a(i,j) = 1;
}
}
c = a * a;
}
void loop() {
}
This code returns
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
If the matrix was defined as Eigen::MatrixXd a(4,4) Then the code will not return anything. What is wrong here?
Thanks.