Symbolic calculation

10 ビュー (過去 30 日間)
Mohsen
Mohsen 2012 年 5 月 9 日
Hi, consider following commands:
syms a b c;
A=[a b;b c];
[R1,e]=eig(A);
rhs=matlabFunction(R1);
Now I would like to calculate the eigenvalue of [1 2;2 3], So I write:
[Rn,en]=eig([1 2;2 3])
Result in this case is:
Rn =
-0.8507 0.5257
0.5257 0.8507
But if I use symbolic formula:
rhs(1,2,3)
ans =
-1.6180 0.6180
1.0000 1.0000
Why are they different? What is wrong with my calculation?

採用された回答

Oleg Komarov
Oleg Komarov 2012 年 5 月 9 日
You are comparing eigenvectors, which need not be unique.
Comparing eigenvalues:
rhs = matlabFunction(e);
rhs(1,2,3)
en

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by