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!