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

Home » Public Forums » archive » simple question (I hope)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
simple question (I hope) [message #53288] Fri, 30 March 2007 08:22
Ryan. is currently offline  Ryan.
Messages: 77
Registered: March 2006
Member
Dear All,

Do any of you know a fast way of removing elements from an array given
an array of the indices? I know it is possible with a FOR loop but I
would like to avoid that if possbile because the array to be searched
could get quite large. Here is an example of what I would like to do:

A = [0,2,4,6,8,10,12,14,16,18,20]
indices_to_remove = [3,5,9]

to get a resulting array, B:
B = [0,2,4,8,12,14,16,20]

Note: I don't find the indices to remove using the WHERE function so I
am unable to use the COMPLEMENT option.

I think the 2.5 hours at All-You-Can-Eat Sushi last night has affected
my thinking because I'm still digesting.

Thanks,
Ryan.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Exporting ENVI display to reduced reslution JPEG
Next Topic: Re: PLOT axis labels

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

Current Time: Sat Oct 11 09:08:53 PDT 2025

Total time taken to generate the page: 0.23760 seconds