Eigenvalues Eigenvectors

20 views
Skip to first unread message

Demetris Tziambazis

unread,
Feb 27, 2015, 11:00:56 AM2/27/15
to libfi...@googlegroups.com
Hi everyone,

is there a way of computing eigenvalue/eigenvector computation with libfixmath with the current functions?? (finding eigenvalues of a 3x3 symmetric matrix)

maybe a way of solving a couple of matrix equations?

Does anyone ever needed something like that?

Petteri Aimonen

unread,
Feb 27, 2015, 3:18:10 PM2/27/15
to libfi...@googlegroups.com
Hi,

> is there a way of computing eigenvalue/eigenvector computation with
> libfixmath with the current functions?? (finding eigenvalues of a 3x3
> symmetric matrix)

Maybe this?
https://github.com/PetteriAimonen/libfixmatrix

It has QR-decomposition, from which you can get eigenvalues with this
algorithm:
http://en.wikipedia.org/wiki/QR_algorithm

--
Petteri

Demetris Tziambazis

unread,
Feb 28, 2015, 6:14:21 AM2/28/15
to libfi...@googlegroups.com
Hi Petteri, 

Thank you for your reply,

I saw that again and I am using QR decomposition elsewhere in my program. I jsut dont know how to use it to find eigens.

I read again the wikipedia post as well as other posts but i dont sem to get what I am doing with the Q and R matrices.

A = QR (the easiest part - a line of code)

Then according to wiki I just do: 

Anew = RQ and iterate......but for how many times?

and if i get it correctly the last Anew that is going to be produced is going to be my eigenvector matrix and the last diag(R) is goint to be the eigenvalues?

for example: 
for(i = 0; i<3; i++)
{
// Finding the inverse of matrix Adew
mf16_qr_decomposition(ptr_q, ptr_r, ptr_Adew, 0);

mf16_mul(ptr_Adew, ptr_r, ptr_q);
}

Again thank you!! :)

Demetris Tziambazis

unread,
Feb 28, 2015, 1:36:55 PM2/28/15
to libfi...@googlegroups.com
OK so i tried the following and iT WORKS (for finding the eigenvalues). BUT WHAT ABOUT THE EIGENVECTORS ??? HOW DO WE FIND THEM ??

for(i = 0; i<20; i++)
{
// Finding the inverse of matrix Adew
mf16_qr_decomposition(ptr_q, ptr_r, ptr_Adew, 0);
mf16_mul(ptr_Adew, ptr_r, ptr_q);
}

Demetris Tziambazis

unread,
Feb 28, 2015, 3:39:27 PM2/28/15
to libfi...@googlegroups.com
OK again, UPDATE!! 


when you build it and run it (with libfixmath ofcourse) we supposed to get the eigenvalues and eigenvectors.

But I think we dont get right the eigenvectors.

I all open to ideas about what might be wrong, correction about the code (writing style etc) anything you can think of, but ofcourse try to center your mind on the eigenvectors! :) :P The actual loop is like 3 lines.....

Thank you!! Oh and C newbie here....

On Friday, February 27, 2015 at 5:00:56 PM UTC+1, Demetris Tziambazis wrote:
Reply all
Reply to author
Forward
0 new messages