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

Home » Public Forums » archive » Re: correct way to use INTERPOLATE function
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: correct way to use INTERPOLATE function [message #55976 is a reply to message #55974] Fri, 21 September 2007 13:49 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pgrigis@gmail.com writes:

> For that purpose, you can also use INTERPOL (rather than INTERPOLATE).
> Here's an example:
>
> x=findgen(6)/5
> y=[0.,2,2,5,6,10]
>
> ;first data set
> plot,x,y,psym=-6
>
> x2=findgen(100)/100
> z=interpol(y,x,x2)
> ;the z array is interpolated linearly from the point in y
>
> oplot,x2,z,psym=-4
>
> Is that waht you are trying to do?

Ah, interesting. After some playing around with CONGRID
keywords, I discovered that this interpolation method
is virtually identical to this:

nelem = N_Elements(x2)
OPLOT, x2, CONGRID(y, nelem, /INTERP, /MINUS_ONE)

Could be an interesting article in here somewhere. :-)

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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: News server
Next Topic: 'object' in IDL terminalogy

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

Current Time: Fri Oct 10 07:25:05 PDT 2025

Total time taken to generate the page: 0.56005 seconds