How to find eigen vectors?

2 次查看(过去 30 天)
Sandy
Sandy 2015-12-4
回答: Marc 2015-12-5
I am using:
A= [-5, 2; 2, -2];
[EigVec, EigVal] = eig(A)
If I use Wolfram, I obtain Eigen Vectors = [1,2;1, -0.5]. Similarly, how can I get MatLab to scale it to 1?
  1 个评论
John D'Errico
John D'Errico 2015-12-5
编辑:John D'Errico 2015-12-5
I answered this identical question before. You cannot get MATLAB to magically scale them as you desire. However, you can DIVIDE EACH VECTOR BY THE FIRST ELEMENT OF THAT VECTOR. Just do the scaling yourself. Take care that the first element is not zero.

请先登录,再进行评论。

回答(1 个)

Marc
Marc 2015-12-5
I love questions like this... As I am always confused?
Maybe it is the way you are setting it up in Wolfram but if you have the symbolic toolbox in Matlab you can use this....
>> A= sym([-5 2; 2 -2])
A =
[ -5, 2] [ 2, -2]
>> [EigVec, EigVal] = eig(A)
EigVec =
[ -2, 1/2] [ 1, 1]
EigVal =
[ -6, 0] [ 0, -1]
So you get something close to what you wanted?
Try something like this in Maple....
A := Matrix([[-5, 2], [2, -2]])
Eigenvectors(A)
Vector(2, {(1) = -1, (2) = -6}), Matrix(2, 2, {(1, 1) = 1/2, (1, 2) = -2, (2, 1) = 1, (2, 2) = 1})
So Matlab's Symbolic toolbox and Maple are reversing the signs which I don't think is a big deal and of course they put things in different spots... Again not a big deal but it just makes you wonder? Or not.

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by