-1

I have a matrix, I need to get the eigenvectors. I already calculated the eigenvalues, Let's assume we have the eigenvalues, I wrote this

  for i = 1:length(c)
  syms y
  cal_vec = (c-eig_Val(i)*I)*y == 0;
  eigVec(:,i) = double(solve(cal_vec,y));
end

now I got zero as y, but I need to get y 1 and y2

chtz
  • 17,329
  • 4
  • 26
  • 56
mufty__py
  • 127
  • 1
  • 12

1 Answers1

0

The method you are looking for is null, i.e., calculate the null-space of c-eig_Val(i)*I.

Be aware that it won't work out-of-the-box if you have eigenvalues with multiple eigenvectors, or if your eigenvalues are not (sufficiently) accurate.

chtz
  • 17,329
  • 4
  • 26
  • 56