0001 function nu = getnusympmat(M44)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 if nargin < 1
0014 global THERING
0015 M44 = findm66(THERING);
0016 end
0017
0018 n = 4;
0019
0020 M = M44(1:4, 1:4);
0021 M = M - eye(4); detp = det(M); M = M + 2*eye(4); detm = det(M); M = M - eye(4);
0022 b = (detp-detm)/16.0; c = (detp+detm)/8.0 - 1.0;
0023 th = (M(1, 1)+M(2, 2))/2.0; tv = (M(3, 3)+M(4, 4))/2.0;
0024 b2mc = b^2 - c;
0025 if b2mc < 0.0
0026 nu = [-1.0; -1.0];
0027 disp('** Getnu: unstable in tune');
0028 else
0029 if (th > tv)
0030 sgn = 1.0;
0031 else
0032 sgn = -1.0;
0033 end
0034 nu = [acos(sgn*sqrt(b2mc)-b)/(2.0*pi); acos(-b-sgn*sqrt(b2mc))/(2.0*pi)];
0035 for i = 1:n/2
0036 j = 2*i - 1;
0037 if (M(j,j+1) < 0.0)
0038 nu(i) = 1.0 - nu(i);
0039 end
0040 end
0041 end