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

Home » Public Forums » archive » Delete bad data and interplate the new data
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: Delete bad data and interplate the new data [message #53023 is a reply to message #52950] Tue, 13 March 2007 09:18 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Mon, 12 Mar 2007 02:23:54 -0700, duxiyu@gmail.com wrote:

> I have a data array.
> But there is some bad data in it.
> I want to use the interpolative data to replace these bad points.
>
> It is easy to make a procedure to do it, but I wonder whether there is
> internal procedure in IDL.

Yes, INTERPOL:

data=[1,2,3,42,5,6,7]
badval=42
bad=where(data eq badval,nbad,COMPLEMENT=good,NCOMPLEMENT=ngood)
if nbad gt 0 && ngood gt 1 then data[bad]=interpol(data[good],good,bad)

If you want to do 2D or higher-dimension interpolation, you'll need a
bit more magic.

JD
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: randomn problem
Next Topic: Material properties for object graphics

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

Current Time: Fri Oct 10 15:07:52 PDT 2025

Total time taken to generate the page: 0.23819 seconds