フィルターのクリア

Why am I getting negative zero as an eigen value while using the 'eig' function?

2 ビュー (過去 30 日間)
Prajit T R
Prajit T R 2018 年 4 月 6 日
回答済み: Steven Lord 2018 年 4 月 6 日
Hi all
I ran the following code which makes use of the 'eig' function and I encountered a negative zero in the value printed out by it. Is this valid? If yes, what does the negative sign signify?
a=[1 2 3;1 2 3; 1 2 3]
eig(a)
This gives me the following output:
ans =
6.0000
0.0000
-0.0000
Thanks in advance.

採用された回答

Steven Lord
Steven Lord 2018 年 4 月 6 日
Change your display format and you'll see that the third element of that vector is very small in magnitude and negative but not exactly 0.

その他の回答 (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