Bluebit Software
Bluebit Software Support Forum
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



Eigen Class Expand / Collapse
Message
Posted Wednesday, December 07, 2005 2:59 AM Post #74
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Any examples out there on how to use Eigen members?

I got a matrix and I need to find the diagonal matrix, eigenvalue, and eigenvectors. I see all the member functions, but I don't know how to use them.

CMatrix *A = new CMatrix(3, 3);
A->Item[0][0] = -3.0; A->Item[0][1] = -2.0; A->Item[0][2] = 0.0;
A->Item[1][0] = 14.0; A->Item[1][1] = 7.0; A->Item[1][2] = -1.0;
A->Item[2][0] = -6.0; A->Item[2][1] = -3.0; A->Item[2][2] = 1.0;
Posted Wednesday, December 07, 2005 5:35 AM Post #260
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
nm, I got it lol
Posted Wednesday, December 07, 2005 6:53 AM Post #261
 

Bluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit Support
Hello

The syntax is
CMatrix *A = new CMatrix(3, 3); 
A->set_Item(0, 0, Complex(-3.0, 0));
If there is only real part, you can also use:
A->set_Item(0, 0,-3.0);
since the Double structure can be directly casted into a Complex.



Trifon Triantafillidis

Lead Developer

Bluebit Software

Posted Wednesday, December 07, 2005 7:02 AM Post #262
 

Bluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit Support
... and then you may use the CEigen class as follows:
   
CEigen* E = new CEigen(A);
Console::WriteLine(E->Eigenvectors );
Console::WriteLine(E->Eigenvalues );





Trifon Triantafillidis

Lead Developer

Bluebit Software

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Trifon

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 6:58am

Powered by InstantForum.NET v4.1.4 © 2012
Execution: 0.328. 10 queries. Compression Disabled.
.NET Matrix Library