Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Strange rounding errors?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a matrix A(7,7) with different real values.
If I do:
Test1=sum(sum(40*A));
Test2=40*sum(sum(A));
I get slightly different values for Test1 and Test2 (Test1-Test2=1e-8 or so)
In cases of simple matrix elements like numbers 1,2,3,etc. this doesn't happen. With my entries though, which are different in size...
Now I suppose this behaviour is due to rounding errors...What would be best? If I use Test2 for calculations?
Or is there something I misunderstood?
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!