Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Eigenvalues

Subject: Eigenvalues

From: Pablo Ñañez

Date: 13 May, 2011 01:33:04

Message: 1 of 5

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*E-A
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,

Subject: Eigenvalues

From: Nasser M. Abbasi

Date: 13 May, 2011 02:12:57

Message: 2 of 5

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*E-A
> 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*E-A
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

Subject: Eigenvalues

From: Roger Stafford

Date: 13 May, 2011 02:18:03

Message: 3 of 5

"Pablo Ñañez" <pa.nanez49@uniandes.edu.co> wrote in message <iqi1og$5m0$1@newscl01ah.mathworks.com>...
> 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*E-A
> 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,
- - - - - - - - - -
  Your statement "I known that the solution is two finite eigenvalues at 1/2 +/- i/2 and three eigenvalues at infinity" cannot be true. The characteristic equation that defines the eigenvalues is a fifth order polynomial equation in the unknown eigenvalue with coefficients that depend on the variable s. In mathematics it is known that such equations always have five roots in the complex field regardless of their dependence on s, though some of them may be repeated roots. They cannot in any sense have values at infinity.

  It is also true that there may be no symbolic solution for such fifth or greater order polynomials in terms of radicals.

Roger Stafford

Subject: Eigenvalues

From: Greg von Winckel

Date: 13 May, 2011 08:44:04

Message: 4 of 5

Only generalized eigenvalue problems can have infinite eigenvalues (among other odd possibilities).

Subject: Eigenvalues

From: Roger Stafford

Date: 14 May, 2011 05:08:04

Message: 5 of 5

"Pablo Ñañez" <pa.nanez49@uniandes.edu.co> wrote in message <iqi1og$5m0$1@newscl01ah.mathworks.com>...
> 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*E-A
> 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,
- - - - - - - - -
"Greg von Winckel" wrote in message <iqir0k$5jk$1@newscl01ah.mathworks.com>...
> Only generalized eigenvalue problems can have infinite eigenvalues (among other odd possibilities).
- - - - - - - - -
  That is undoubtedly what Pablo had in mind, Greg. I missed that. Given his description of the expected eigenvalues, he clearly had in mind finding the generalized eigenvalues of eig(E,A) in symbolic form. Unfortunately matlab's 'eig' does not appear to accept symbolic inputs for the generalized eigenvalue/eigenvector problem. Presumably he will have to be content with finding the roots of

 det(s*E-A) = 6*s^2 + 6*s + 3 = 0

which are in fact the two finite ones he has already mentioned.

Roger Stafford

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us