How can I get precise result?

6 ビュー (過去 30 日間)
Ivor Horton
Ivor Horton 2020 年 6 月 19 日
コメント済み: Ivor Horton 2020 年 6 月 19 日
I'm new to Matlab and I did some test.
format longG
a = [1 -1 -1 3; 2 -1 -3 1; 3 2 -5 2; 3 1 2 2]
b = adjoint(a)
a * b
The result looks like this:
As you can see, there are a lot .9999999... and e-14 or e-15. These e-14 or e-15 numbers are actually all 0s. How can I get precise result?
I did a similar calculation in Mathematica, and below is the result.
How can I get this similar result in Matlab? Thanks.

採用された回答

madhan ravi
madhan ravi 2020 年 6 月 19 日
編集済み: madhan ravi 2020 年 6 月 19 日
  3 件のコメント
madhan ravi
madhan ravi 2020 年 6 月 19 日
Ivor Horton
Ivor Horton 2020 年 6 月 19 日
Thanks again!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumbers and Precision についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by