find behavior is weird

조회 수: 8 (최근 30일)
ahmed shaaban
ahmed shaaban 2015년 2월 24일
댓글: ahmed shaaban 2015년 2월 24일
Hello all I am trying to use find to find some value, however, it sometimes works, other not.
gLat = -40:0.1:40;
find(gLat == 4.2)
I found
ans =
Empty matrix: 1-by-0
Any explanation for this. Thanks in advance

채택된 답변

Sean de Wolski
Sean de Wolski 2015년 2월 24일
  댓글 수: 1
ahmed shaaban
ahmed shaaban 2015년 2월 24일
thanks a lot it works, I modified it to be
find (abs(gLat-4.2) < 0.00001)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by