I am trying to isolate a subset of data from a large set.
I want to find all the points that are less than or equal to (a) AND are greater than for equal to (b)
I have the following:
[a,b] = find (lat(:,:) >= 44 & <= 55)
Previously I used
[a,b] find (lat(:,:) >= 44)
which worked perfectly. Now I receive "the unexpected matlab operator" error which it reaches the <
thanks for help,

댓글 수: 1

Walter Roberson
Walter Roberson 2012년 6월 2일
I do not recall that any of the computer languages I have used have allowed that kind of abbreviation of logical comparisons. There might be some computer languages that allow it, but it is certainly not common.

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

 채택된 답변

the cyclist
the cyclist 2012년 6월 2일

1 개 추천

find (lat >= 44 & lat <= 55)

댓글 수: 2

Barry H
Barry H 2012년 6월 2일
Well played, sir. Thank you
BMAN
BMAN 2017년 12월 6일
I have a 3d matrix A(time*lat*lon). i want find the value which is greater than 10 at every grid point how to find that. i am using A(i,:,:) A(A > 10); but it is not giving correct ans

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interpolation of 2-D Selections in 3-D Grids에 대해 자세히 알아보기

질문:

2012년 6월 2일

댓글:

2017년 12월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by