LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use SymEigenValueVector ?

The function I use does not return me the eigenvalues expected. I use Matlab to get the eigenvalues and the results expected are also given on this website :
http://www.math-info.univ-paris5.fr/~ycart/MC2/node6.html

Here, I give a sample of what I have tried :

{
double A[3][3], *eigenVectors;
double eigenValues[3];
int i;
i=0;

//A= (double *) calloc (9, sizeof(double));
eigenVectors= (double *) calloc (9, sizeof(double));

//*(A+0)=0;*(A+1)=-0.5;*(A+2)=1.5;
//*(A+3)=1;*(A+4)=1.5;*(A+5)=-1.5;
//*(A+6)=1;*(A+7)=-0.5;*(A+8)=0.5;


A[0][0]=0;A[0][1]=-0.5;A[0][2]=1.5;
A[1][0]=1;A[1][1]=1.5;A[1][2]=-1.5;
A[2][0]=1;A[2][1]=-0.5;A[2][2]=0.5;

//for (i;i<9;i++) printf("A[%d]=%e\n",i,*(A+i));

SymEigenValueVector (A, 3, 1, eigenValues, eigenVectors);

// We check the results using our own function :

writeASCII_double( eigenValues, 3, "EigenValues", "r:/Eigenvalues.txt" );
writeASCII_double( eigenVectors, 9, "EigenVectors", "r:/Eigenvectors.txt" );

//free(A);
free(eigenVectors);
}
0 Kudos
Message 1 of 1
(2,679 Views)