Re: Working with indices of WHERE [message #38340] |
Wed, 03 March 2004 12:25 |
savoie
Messages: 68 Registered: September 1996
|
Member |
|
|
David Fanning <david@dfanning.com> writes:
> P.S. I think there is a new IDL routine that does this,
> but I can't remember the name.
It's called ARRAY_INDICES.
IDL> y = where(x lt 20)
IDL> idx = ARRAY_INDICES(x, y)
IDL> help, idx
IDX LONG = Array[2, 20]
> David Fanning, Ph.D.
> Fanning Software Consulting
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
Matt.
--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
|
|
|
Re: Working with indices of WHERE [message #38345 is a reply to message #38340] |
Wed, 03 March 2004 09:05  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Nuno Oliveira writes:
> It is possible to work with indices resulting of using the function WHERE.
>
> If I have a certain region I want to move the entire region... can I do
> it with the indices? Where (oh, irony!) can I read about it?
> (I've already looked in the Reference Guide and there's nothing about it).
Oh, Nuno, you are looking entirely in the wrong direction!
http://www.dfanning.com/tips/where_to_2d.html
Convert the 1D indices to columns and rows and add your
offsets.
Cheers,
David
P.S. I think there is a new IDL routine that does this,
but I can't remember the name.
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|