Sat 08 May 2010 11:04:59 PM UTC, comment #1:
There seem to be some syntax errors in your example code. I think I fixed them, because I'm able to reproduce the Matlab result with Octave 3.2.4 and the current development sources on my Debian system.
I suspect the problem is in your copy of LAPACK. What version do you have?
On my system, I have
liblapack.so.3gf => /usr/lib/atlas/liblapack.so.3gf
from the package libatlas3gf-base, version 3.6.0-24.
I'm closing this bug report.
|
Sat 08 May 2010 10:24:21 PM UTC, original submission:
eig(rho) gives singular values something like (it even varies from time to time)
-7.1985e+167
-2.2305e-03
2.2305e-03
7.1985e+167
while matlab gives
0.0250
0.0250
0.0250
0.9250
The matrix rho is constructed as follows
I = sqrt(-1);
t0 = eye(2);
t1 = [0 1;
1 0];
t2 = [0 -I;
I 0];
t3 = [1 0;
0 -1];
m1 = [t1,zeros(2);zeros(2),t1];
m2 = [t2,zeros(2);zeros(2),t2];
m3 = [t3,zeros(2);zeros(2),t3];
m4 = [zeros(2),eye(2);eye(2),zeros(2)];
m5 = [zeros(2),t1;t1,zeros(2)];
m6 = [zeros(2),t2;t2,zeros(2)];
m7 = [zeros(2),t3;t3,zeros(2)];
m8 = [zeros(2),-Ieye(2);Ieye(2),zeros(2)];
m9 = [zeros(2),-It1;It1,zeros(2)];
m10 = [zeros(2),-It2;It2,zeros(2)];
m11 = [zeros(2),-It3;It3,zeros(2)];
m12 = [eye(2),zeros(2);zeros(2),-eye(2)];
m13 = [t1,zeros(2);zeros(2),-t1];
m14 = [t2,zeros(2);zeros(2),-t2];
m15 = [t3,zeros(2);zeros(2),-t3];
n=[ 0.0011057
-0.1341262
0.8377961
0.6086926
0.0829238
-0.2919701
0.6070342
-0.1736753
0.2884966
0.0829238
-0.1736753
-0.5649987
-0.0011057
-0.1263867
-0.6271805
];
rho = (eye(4) + n(1)m1+n(2)m2+n(3)m3+n(4)m4+n(5)m5+n(6)m6+n(7)m7+n(8)m8+n(9)m9+n(10)m10+n(11)m11+n(12)m12+n(13)m13+n(14)m14+n(15)*m15)/4
|