s***@yahoo.com
2006-05-19 23:34:33 UTC
Hallo Dear Scilab profis,
I am trying to translate a MCode into Scilab code and I am experiencing
the following Problem.
I would like to find a matrices of eigenvalues (D) and eigenvectors
(V) of matrix A
A = [ 0.86704636614488 -0.06299441206758 0.43864117996312
-0.03877523903679;
0.04481251200767 0.91855990949380 0.12651267436474
0.34142302233678;
0.00874242025365 0.02020568955919 0.79997826398638
0.06993676528265;
-0.02082126954048 0.01288328778550 -0.09511048005178
0.77291062528872 ];
The Matlab command [V,D] = eig(A)
produces the following results
D =
0.7714 0 0 0
0 0.7865 0 0
0 0 0.8658 0
0 0 0 0.9349
V =
-0.9685 -0.9503 0.9124 0.0230
0.1041 -0.2220 0.3621 0.9892
0.2261 0.1562 0.0327 0.1448
-0.0015 0.1527 -0.1879 -0.0093
Matrix D is the canonical form of A--a diagonal matrix with A's
eigenvalues on the main diagonal.
Matrix V is the modal matrix--its columns are the eigenvectors of A.
The Scilab command [V,D]=spec(A+%i*0)
produces
D =
0.7714 0 0 0
0 0.7865 0 0
0 0 0.8658 0
0 0 0 0.9349
V =
0.9685 0.9503 0.9124 0.0230
- 0.1041 0.2220 0.3621 0.9892
- 0.2261 - 0.1562 0.0327 0.1448
0.0015 - 0.1527 - 0.1879 - 0.0093
As you see, the eigenvalues matrix is identical to Matlab's one.
The eigenvectors matrix has the same numbers BUT different signs.
I need to get the same matrix V in Scilab as in Matlab. Would you
please help me?
Thank you in advance
I am trying to translate a MCode into Scilab code and I am experiencing
the following Problem.
I would like to find a matrices of eigenvalues (D) and eigenvectors
(V) of matrix A
A = [ 0.86704636614488 -0.06299441206758 0.43864117996312
-0.03877523903679;
0.04481251200767 0.91855990949380 0.12651267436474
0.34142302233678;
0.00874242025365 0.02020568955919 0.79997826398638
0.06993676528265;
-0.02082126954048 0.01288328778550 -0.09511048005178
0.77291062528872 ];
The Matlab command [V,D] = eig(A)
produces the following results
D =
0.7714 0 0 0
0 0.7865 0 0
0 0 0.8658 0
0 0 0 0.9349
V =
-0.9685 -0.9503 0.9124 0.0230
0.1041 -0.2220 0.3621 0.9892
0.2261 0.1562 0.0327 0.1448
-0.0015 0.1527 -0.1879 -0.0093
Matrix D is the canonical form of A--a diagonal matrix with A's
eigenvalues on the main diagonal.
Matrix V is the modal matrix--its columns are the eigenvectors of A.
The Scilab command [V,D]=spec(A+%i*0)
produces
D =
0.7714 0 0 0
0 0.7865 0 0
0 0 0.8658 0
0 0 0 0.9349
V =
0.9685 0.9503 0.9124 0.0230
- 0.1041 0.2220 0.3621 0.9892
- 0.2261 - 0.1562 0.0327 0.1448
0.0015 - 0.1527 - 0.1879 - 0.0093
As you see, the eigenvalues matrix is identical to Matlab's one.
The eigenvectors matrix has the same numbers BUT different signs.
I need to get the same matrix V in Scilab as in Matlab. Would you
please help me?
Thank you in advance