LAPACK Archives

[Lapack] Need help in CLAPACK

Hi,

I am trying to implement the "eig" function of Matlab in C with the use of 
dgeev().........But when I compare the results obtatined with Matlab and 
CLAPACK library, they resulted in different.

Here I am providing the code for your reference .  If there is any mistake in 
the usage of the function dgeev(), please help me out...

#include"f2c.h"
#include"clapack.h"
#include"stdio.h"
#define SIZE 4
void MAIN_(){}
void MAIN__(){}
void _MAIN_(){}
main()
{

char JOBVL,JOBVR;
int i,j;
integer N=SIZE;
integer LDA=N;
integer LDVL;
integer LDVR;
integer LWORK;
integer INFO;
double 
A[SIZE][SIZE]={{43,216,254,249},{49,198,193,211},{48,194,177,171},{46,214,225,169}};
double WR[SIZE];
double WI[SIZE];
double WORK[201];
double VL[SIZE];
double VR[SIZE];
JOBVL='N';
JOBVR='V';
LWORK=201;
LDVL=2;
LDVR=6;

dgeev_(&JOBVL, &JOBVR, &N, A, &LDA, WR, WI, VL, &LDVL, VR, &LDVR, WORK, &LWORK, 
&INFO);

printf("\n INFO=%d\n", INFO );
printf("The Eigen vector is:\n");

for(i=0;i<SIZE;i++)
printf("%f\t",VR[i]);

return 0;

}

 
I was expecting to get four eigen vectors, but this program resulted in only 
one eigen vector.

Please help me out ....

Thanks in advance...

Regards,
A.Ramakrishna


 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.cs.utk.edu/private/lapack/attachments/20061127/53cf4875/attachment.htm
 

<Prev in Thread] Current Thread [Next in Thread>


For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or