comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL Question - Opposite of WHERE?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL Question - Opposite of WHERE? [message #35455 is a reply to message #35320] Thu, 12 June 2003 04:37 Go to previous messageGo to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Craig Markwardt" <craigmnet@cow.physics.wisc.edu> wrote in message
news:onvfvcrsz4.fsf@cow.physics.wisc.edu...
>
> Chad Bender <cbender@hapuna.ess.sunysb.edu> writes:
>> zygnus <suicidal_10@yahoo.com> wrote:
>> : is there a command that does the opposite of the WHERE command?
>> : Instead of returning the indeces of elements that satisfy a condition,
>> : it returns the ones that dont satisfy it
>>
>> Try using the 'COMPLEMENT' keyword with where. It should return
>> an array containing the elements not returned in the result output.
>
> Adding my tidbit:
>
> COMPLEMENT is really useful when you want to know the indices of
> *both* the true and the false values of your selection. If you just
> want the false values, then as James said, you can simply negate the
> selection expression.
>
> Craig
>
> --
> ------------------------------------------------------------ --------------
> Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
> ------------------------------------------------------------ --------------

The WHERE function is quite useful, but often I find myself really needing
a WHY function. And of course, it's opposite, the WHYNOT function.

-bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Request for help using IDL in ENVI
Next Topic: Re: ION_IMAGE 8bit/24bit color

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 13:23:23 PDT 2025

Total time taken to generate the page: 0.56161 seconds