- #1

Maxong091

- 4

- 0

I'm trying to find the eigenvectors of a symbolic 3x3 rotation matrix in MATLAB, it appears to work for some inputs but not all, for example:

A =[ cos(q), -sin(q), 0]

[ sin(q), cos(q), 0]

[ 0, 0, 1]

[V,lambda]=eig(A)

V =[ 0, -i, i]

[ 0, 1, 1]

[ 1, 0, 0]

lambda =[ 1, 0, 0]

[ 0, cos(q) - sin(q)*i, 0]

[ 0, 0, cos(q) + sin(q)*i]

this works fine, however if I try something which is not a rotation about a unit axis I get the following error:

A =[ cos(q), -sin(q), 0]

[ 0, 0, -1]

[ sin(q), cos(q), 0]

>> [V,lambda]=eig(A)

Warning: basis of eigenspace for eigenvalue cos(q)/3 - (cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 +

(cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3)/2 + (cos(q)/3 - cos(q)^2/9)/(2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 +

((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/... [linalg::eigenvectors]

? Error using ==> mupadmex

Error in MuPAD command: Unable to find explicit eigenvectors.

Error in ==> sym.sym>sym.mupadmexnout at 2003

out = mupadmex(fcn,args{:});

Error in ==> sym.eig at 68

[V,D,p] = mupadmexnout('mllib::eigenvectors',A);

Any help would be appreciated

Thanks

Max