I'm trying to compute eigenvalue
for matrix[7][7]
, and my code is:
for (i = 0; i<M; i++) //matrix + identity
{
for (j = 0; j<M; j++)
{
MI[i][j] = MX[i][j] + a[i][j];
cout << setw(7) << MI[i][j] << " ";
MatrixXd W;
W = MI[i][j];
SelfAdjointEigenSolver <MatrixXd> eigensolver (W);
cout << "The eigenvalues of A are:\n" << eigensolver.eigenvalues() << endl;
}
cout << endl;
}
My question is am I doing it right calling my matrix by define as matrixXd W
?
I end up with an error in line W = MI[i][j]
:
no operand "=" matches this operand & oeprand types are :MatrixXd=double