forum.alglib.net

ALGLIB forum
It is currently Mon Dec 23, 2024 12:15 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  [ 3 posts ] 
Author Message
 Post subject: Using the HMatrixEVD in Delphi
PostPosted: Sat Jul 28, 2012 2:57 am 
Offline

Joined: Sat Jul 28, 2012 1:51 am
Posts: 4
Hi , currently i'm trying to use the HMatrixEVD function in Delphi. The code required me to create the TComplex2DArray as one of the parameter for the function. Has anyone have the idea how to use it. I need some example at least 2x2 matrix just for the basic.

The function is to find the eigenvalues and eigenvectors of a symmetric matrix

My current code

Code:
uses evd, ap;
procedure TfrmMain.Button1Click(Sender: TObject);
var
  Comp: TComplex2DArray;
  D: TReal1DArray;
  Z: TComplex2DArray;

begin
  Comp[0, 0].X := 5;
  Comp[1, 0].X := 4;
  Comp[0, 1].X := 3;
  Comp[1, 1].X := 4;
  HMatrixEVD(Comp, 2, 0, True, D, Z);
end;


The current code has an error , i'm stuck on how to use it. I've tried to find the example , but still no enough.

Thanks


Top
 Profile  
 
 Post subject: Re: Using the HMatrixEVD in Delphi
PostPosted: Sat Jul 28, 2012 9:17 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
You have to call SetLength() for the array before initializing it.


Top
 Profile  
 
 Post subject: Re: Using the HMatrixEVD in Delphi
PostPosted: Fri May 10, 2013 7:24 am 
Offline

Joined: Sat Jul 28, 2012 1:51 am
Posts: 4
Ok , this problems have been solved. Thanks.


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 12 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