forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 9:10 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: eigenvals problem
PostPosted: Thu Jun 21, 2018 4:46 pm 
Offline

Joined: Thu Jun 21, 2018 4:36 pm
Posts: 1
Hello. I already have a lot of time and can not really figure out how to count eigenvecs in the AlgLib library.

Here is an example with a solution in the matkad with which I try to reduce my results:
http://old.exponenta.ru/soft/mathcad/learn/la/mathcad/ex3/ex3.htm
There is a matrix:

Code:
{ 1, 2, 3 },
{ 0, 1, 2 },
{ 3, 4, 1 }


Next, I use the alglib.rmatrixevd
Code:
alglib.rmatrixevd(M, 3, 3, out wr, out wi, out vl, out vr);


Here are the results:
Code:
матрица wr
Eigenvals
-2,710+0,000i
0,271+0,000i
5,439+0,000i


This corresponds to the eigenvalues ??in the same example of the mitkad, even in an inverted form.

But here's the trouble.
The library function gives me the result as left and right vectors:
Code:
Eigenvec
Матрица vr
0.518   -1.000   -0.879   
0.539   0.803   -0.451   
-1.000   -0.293   -1.000   

Матрица vl
0.809   -0.708   -0.561   
0.642   1.000   -1.000   
-1.000   0.172   -0.829



In the description they write:
Quote:
VL, VR - arrays of left and right eigenvectors (if they are needed).
If WI[i]=0, the respective eigenvalue is a real number,
and it corresponds to the column number I of matrices VL/VR.
If WI[i]>0, we have a pair of complex conjugate numbers with
positive and negative imaginary parts:
the first eigenvalue WR[i] + sqrt(-1)*WI[i];
the second eigenvalue WR[i+1] + sqrt(-1)*WI[i+1];
WI[i]>0
WI[i+1] = -WI[i] < 0
In that case, the eigenvector corresponding to the first
eigenvalue is located in i and i+1 columns of matrices
VL/VR (the column number i contains the real part, and the
column number i+1 contains the imaginary part), and the vector
corresponding to the second eigenvalue is a complex conjugate to
the first vector.
Arrays whose indexes range within [0..N-1, 0..N-1].


How much I did not get into it and did not even try the required result even close.

Should be:

Code:
0,625 0,76 -0,415
0,321 -0,611 -0,432
0,711 0,222 0,801


In general, please poke my nose that where and how do I count to come to the specified result?
Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group