Re: How to test for a vector/matrix of constants? [message #51763 is a reply to message #51762] |
Wed, 06 December 2006 13:05   |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
On Wed, 6 Dec 2006, Paul van Delst wrote:
> FĂ–LDY Lajos wrote:
>>
>> my solution would be:
>>
>> mini=min(array, max=maxi)
>> if mini eq maxi then ...
>
> I think Bob's solution is the safest since that is the only one that doesn't
> use the "EQ" operator. Insert the usual reasons here for not wanting to use
> "EQ" to compare floats.
>
> cheers
>
> paulv
>
> p.s. Of course, one hopes the guts of ARRAY_EQUAL handles it correctly. :o)
ARRAY_EQUAL is practically the same as EQ, only the number of comparisons
may differ. And it is available since IDL 5.4 only.
regards,
lajos
ps: Did you know, that ARRAY_EQUAL has the undocumented keywords /NE, /GE,
/GT, /LE, /LT? And they are reserved words :-)
>
> --
> Paul van Delst Ride lots.
> CIMSS @ NOAA/NCEP/EMC Eddy Merckx
> Ph: (301)763-8000 x7748
> Fax:(301)763-8545
>
|
|
|