On 5/12/2011 6:33 PM, Pablo Ñañez wrote:
> hi everyone,
>
> I am trying to calculate the eigenvalues of a symbolic matrix
> syms s
> A = [0 0 1 0 0; 0 0 0 1 0; 3 1 10 5 1; 1 2 5 6 1; 1 1 0 0 0]
> E = [1 0 0 0 0 ; 0 1 0 0 0; 0 0 5 0 0; 0 0 0 1 0; 0 0 0 0 0]
> EA = s*EA
> eig(EA)
>
> but i have the next error
>
> ??? Error using ==> mupadmex
> Error in MuPAD command: unable to define matrix over Dom::ExpressionField()
> [(Dom::Matrix(Dom::ExpressionField()))::new]
>
> Error in ==> sym.eig at 57
> V = mupadmex('mllib::eigenvalues',A.s);
>
> I known that the solution is two finite eigenvalues at 1/2 +/ i/2 and three
>eigenvalues at infinity,
>
> Could any one help me to solve this problem?
>
> thanks,
works ok for me, matlab 2011a

EDU>> clear all
syms s
A = [0 0 1 0 0; 0 0 0 1 0; 3 1 10 5 1; 1 2 5 6 1; 1 1 0 0 0];
E = [1 0 0 0 0 ; 0 1 0 0 0; 0 0 5 0 0; 0 0 0 1 0; 0 0 0 0 0];
EA = s*EA
e=eig(EA)

EA =
[ s, 0, 1, 0, 0]
[ 0, s, 0, 1, 0]
[ 3, 1, 5*s + 10, 5, 1]
[ 1, 2, 5, s + 6, 1]
[ 1, 1, 0, 0, 0]
e =
RootOf(z1^5  z1^4*(8*s + 16) + z1^3*(72*s + 18*s^2 + 40) 
z1^2*(88*s + 96*s^2 + 16*s^3 + 30) + z1*(36*s + 48*s^2 + 40*s^3 + 5*s^4 + 11)  6*s  6*s^2  3, z1)[1]
RootOf(z1^5  z1^4*(8*s + 16) + z1^3*(72*s + 18*s^2 + 40) 
z1^2*(88*s + 96*s^2 + 16*s^3 + 30) + z1*(36*s + 48*s^2 + 40*s^3 + 5*s^4 + 11)  6*s  6*s^2  3, z1)[2]
RootOf(z1^5  z1^4*(8*s + 16) + z1^3*(72*s + 18*s^2 + 40) 
z1^2*(88*s + 96*s^2 + 16*s^3 + 30) + z1*(36*s + 48*s^2 + 40*s^3 + 5*s^4 + 11)  6*s  6*s^2  3, z1)[3]
RootOf(z1^5  z1^4*(8*s + 16) + z1^3*(72*s + 18*s^2 + 40) 
z1^2*(88*s + 96*s^2 + 16*s^3 + 30) + z1*(36*s + 48*s^2 + 40*s^3 + 5*s^4 + 11)  6*s  6*s^2  3, z1)[4]
RootOf(z1^5  z1^4*(8*s + 16) + z1^3*(72*s + 18*s^2 + 40) 
z1^2*(88*s + 96*s^2 + 16*s^3 + 30) + z1*(36*s + 48*s^2 + 40*s^3 + 5*s^4 + 11)  6*s  6*s^2  3, z1)[5]
To get a numerial value, the above is a poly in z, must pick some value for s. Here I choose s=1

vpa(subs(e,s,1))
0.13476216786029666151435889929247
1.1144381976563523086214575036995
1.3936801472383442494214271019454
4.1695565206750162227425144860125
17.18756296656999055770024200905
Nasser
