How to find eigen vectors?

2 visualizzazioni (ultimi 30 giorni)
Sandy
Sandy il 4 Dic 2015
Risposto: Marc il 5 Dic 2015
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 Commento
John D'Errico
John D'Errico il 5 Dic 2015
Modificato: John D'Errico il 5 Dic 2015
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.

Accedi per commentare.

Risposte (1)

Marc
Marc il 5 Dic 2015
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.

Categorie

Scopri di più su Linear Algebra in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by