MATLAB and rounding
Mostra commenti meno recenti
Hi! I'm a novice in MATLAB. I have a simple problem:
> x=9.459012348 > y=9.459012347
> x-y
ans =
1.000000082740371e-009
Hmmm... Why I get that "...82740371"? Thank you very much.
Risposte (2)
Oleg Komarov
il 2 Lug 2011
1 voto
x-y cannot be represented exactly in binary form, thus it approximates the result.
Carlo Cavaliere
il 2 Lug 2011
0 voti
Categorie
Scopri di più su Introduction to Installation and Licensing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!