Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Eigenvalues using matlab

  1. Apr 25, 2012 #1
    I use the command eig(A) to calculate the eigenvalues of the matrix A, in which k,α,β,γ are variables,

    A=[-0.5*k -i*α 0;-i*α -0.5*γ -i*β;0 i*β -0.5k];
    eig(A)

    but the matlab shows "Undefined function or variable 'k'."
    I don't know how to define the variables k,α,β,γ.
    Can anyone tell me how to do it? Thanks!
     
  2. jcsd
  3. Apr 25, 2012 #2

    jhae2.718

    User Avatar
    Gold Member

  4. Apr 26, 2012 #3
    It works. Thanks a lot!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook