Calculating Eigenvalues w/ MATLAB: Defining Variables k,α,β,γ

  • Context: MATLAB 
  • Thread starter Thread starter quansnow
  • Start date Start date
  • Tags Tags
    Eigenvalues Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 3K views
quansnow
Messages
3
Reaction score
0
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!
 
Physics news on Phys.org
It works. Thanks a lot!