[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Not where
Kenneth P. Bowman (email@example.com) writes:
> I often find myself using WHERE to divide an array into two parts. I do
> one operation on the first part and a different operation on the second
> It would be nice to have an auxiliary array containing all the indices
> that are *not* returned by WHERE in i. For example, it would be nice to
> a = FLTARR(...)
> i = WHERE((a...), count, NOT_WHERE = j, NOT_COUNT = not_count)
> IF (count GT 0L) THEN a[i] = ...
> IF (not_count GT 0L) THEN a[j] = ...
> Lacking the above changes to WHERE, can anyone suggest a fast and easy way
> to get j=NOT(i) ?
Now *here* is a place where Alex's matrix operations will
really pay off!
I'll leave it to Alex to handle this question. :-)
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: firstname.lastname@example.org
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155