forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 7:35 pm

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: Eigen value problem
PostPosted: Sun Aug 14, 2011 6:15 pm 
Offline

Joined: Sun Aug 14, 2011 2:46 pm
Posts: 2
Hello everybody,
I am new in c++ and ALGlib. I am trying to use the function:

hmatrixevd( a, n, zneeded, isupper, d, z);
in order to get the eigen values for a hermitian matrix 'a' that contains complex elements. The problem that I face is that, the matrix 'a' must be given as string as shown below, for example:

complex_2d_array a = "[ [2.5,1+2i] , [1-2i, 1.5] ]";

and I have to solve the eigen value problem using 'hmatrixevd' function for hundreds of times and each time with different elements of the Hermitian matrix 'a'.
The question is that, how can I get the matrix a in string form to passed it to the function.

Please any suggestions.


Top
 Profile  
 
 Post subject: Re: Eigen value problem
PostPosted: Mon Aug 15, 2011 7:35 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
You don't have to i nitialize matrix as string - it is just one of several ways of initializing matrix. You can initialize it: a) from string, b) using setlength() + element-by-element initialization, c) using setcontent()


Top
 Profile  
 
 Post subject: Re: Eigen value problem
PostPosted: Tue Aug 16, 2011 10:12 am 
Offline

Joined: Sun Aug 14, 2011 2:46 pm
Posts: 2
Thanks a lot for your valuable response.


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: No registered users and 21 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