forum.alglib.net
http://forum.alglib.net/

Using the HMatrixEVD in Delphi
http://forum.alglib.net/viewtopic.php?f=2&t=603
Page 1 of 1

Author:  akunyer [ Sat Jul 28, 2012 2:57 am ]
Post subject:  Using the HMatrixEVD in Delphi

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

Author:  Sergey.Bochkanov [ Sat Jul 28, 2012 9:17 am ]
Post subject:  Re: Using the HMatrixEVD in Delphi

You have to call SetLength() for the array before initializing it.

Author:  akunyer [ Fri May 10, 2013 7:24 am ]
Post subject:  Re: Using the HMatrixEVD in Delphi

Ok , this problems have been solved. Thanks.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/