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
Ivor Horton
Ivor Horton 2020년 6월 19일
Thanks again!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by