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

Home » Public Forums » archive » Re: drop array elements
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: drop array elements [message #21471 is a reply to message #21461] Fri, 25 August 2000 00:00 Go to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Matthew Kay wrote:
>
> Hi,
>
> Would anyone have any suggestions for an easy way
> to drop elements in an array? For example, say 'a'
> is a 14x1024 array and 'b' is a 1x25 array of row
> indicies in 'a' that should be dropped. Is there
> a simple command for re-assigning 'a', without the
> 25 rows indicated in 'b'?
>
> Much thanks,
> Matt

a=a[*,where(histogram(b,MIN=0,MAX=(size(a,/DIMENSIONS))[1]-1 ,BINSIZE=1) eq 0)]

The real meat here is finding a list of indices which do not contain the
elements of b. There are many ways to do this, but this is a fast one.

JD

--
J.D. Smith /*\ WORK: (607) 255-6263
Cornell University Dept. of Astronomy \*/ (607) 255-5842
304 Space Sciences Bldg. /*\ FAX: (607) 255-5875
Ithaca, NY 14853 \*/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: PV-WAVE Runtime Mode Balks
Next Topic: PV-WAVE Runtime Mode Balks

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

Current Time: Fri Oct 10 23:05:49 PDT 2025

Total time taken to generate the page: 1.27888 seconds