why '==' is not working properly, or what do I do wrong?
이전 댓글 표시
I just want to know why this happens...

댓글 수: 1
Bob Thompson
2018년 11월 21일
More than likely this is a limitation of the binary. If you expand the number of sigfigs on a(5) and b(100) you will likely find that some small decimal place is slightly different.
답변 (1개)
Jos (10584)
2018년 11월 21일
There is a small difference, as shown by subtraction:
b(100)-a(5)
To tolerate such a small difference between x and y, try this
abs(x-y) < .0001
카테고리
도움말 센터 및 File Exchange에서 Elementary Math에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!