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 #35461 is a reply to message #35320] Wed, 11 June 2003 18:21 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
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
------------------------------------------------------------ --------------
[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 06:10:31 PDT 2025

Total time taken to generate the page: 0.24069 seconds