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

Home » Public Forums » archive » Re: Removing bad data from an array
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: Removing bad data from an array [message #55332 is a reply to message #55331] Fri, 10 August 2007 08:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Melanie writes:

> I am trying to remove bad data points from an array. I have found the
> index numbers where the bad data points are located, but I am not sure
> the most efficient way to go through the array and remove those data
> points. Does anyone know of a simple way to do this?

It is probably easier to look for the *good* points, but...
to each his own. :-)

Try something like this:

badpnts = Where( array LT whatever, badcount, $
COMPLEMENT=goodpnts, NCOMPLEMENT=goodcount)
IF goodcount GT 0 THEN array = array[goodpnts]

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Removing bad data from an array
Next Topic: Memory benefit from subroutines

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

Current Time: Fri Oct 10 12:48:26 PDT 2025

Total time taken to generate the page: 0.24258 seconds