필터 지우기
필터 지우기

Wrong values with greater than, equal and less than or equal functions

조회 수: 7 (최근 30일)
[EDIT: Tue May 17 14:40:06 UTC 2011 - Reformat - MKF]
When I use the greater than function, equal function and less than or equal function I obtain wrong values, for example:
>> 1.6-1.5>.1
ans =
1
>> (1.6-1.5)>.1
ans =
1
>> (1.6-1.5)>0.1
ans =
1
>> eq((1.6-1.5),0.1)
ans =
0
>> gt((1.6-1.5),0.1)
ans =
1
>> le((1.6-1.5),0.1)
ans =
0

채택된 답변

Andy
Andy 2011년 5월 17일

추가 답변 (1개)

James Tursa
James Tursa 2011년 5월 17일
You might find this utility useful:
It will display the exact decimal value of the numbers you are working with.

카테고리

Help CenterFile Exchange에서 Timing and presenting 2D and 3D stimuli에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by