Registered Member
|
Greeting to all,, I am working on arduino and using the eigen library in it... I have to find eigen values and eigen vectors of complex matrix but don't know how to do that . I have downloaded the library of eigen from github,. There are no examples in the downloaded pack which could help me,
So any one can help me out that how can i find the eigen values of complex numbers? What is the algorithm of finding it? How can i do this in arduino? I am using arduino due board and the eigen library that i downloaded from github is compatible with Arduino due board. |
Registered Member
|
Hello,
my first guess was to do something like
Unfortunately this got me a compilation error (I only replaced the MatrixXd by MatrixXcd in the example there http://eigen.tuxfamily.org/dox/classEigen_1_1EigenSolver.html). Then looking a bit further in the documentation I found this: http://eigen.tuxfamily.org/dox/classEigen_1_1ComplexEigenSolver.html The code must be transformed into
Then it works like charm. Best regards and thank you for the very good work. |
Registered Member
|
thanks @jeanpauldax .. as in you examples you have made a random number matrix and then u find the eigen values ... In my case I have a matrix of complex number or more specificly i have to create a matirx of complex number on the basis of some calculation ,,, so when i try to create matrix of complex number the compiler show an error that" operater = is not supoorted in this case " . so if i am using this eigen library than how could i assign a value to complex matrix ??
|
Moderator
|
There should not be any difficulty, so please be more specific about what you tried. Moreover, if your matrix is selfadjoint (aka hermitian), then better use the SelfAdjointEigenSolver<> class which is faster and simpler to use because in this case we know that the eigenvalues are real.
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]