Using greater than and less than

Asked by Barry H on 2 Jun 2012
Latest activity Commented on by Walter Roberson on 2 Jun 2012

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 Comment

Walter Roberson on 2 Jun 2012

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.

Barry H

Products

No products are associated with this question.

1 Answer

Answer by the cyclist on 2 Jun 2012
Accepted answer
 find (lat >= 44 &  lat <= 55) 

1 Comment

Barry H on 2 Jun 2012

Well played, sir. Thank you

the cyclist

Contact us