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

Home » Public Forums » archive » Interpolate
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: Interpolate [message #91915 is a reply to message #91914] Tue, 15 September 2015 07:37 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Klemen writes:

> IDL> x = findgen(42)
> IDL> y = (x-20.)^2 ;just an example
> IDL> plot, x, y
> IDL> yy = interpol(y, 256)
> IDL> plot, indgen(256), yy

Humm. Not sure that is right. Isn't it more like this:

x = findgen(42)
y = (x-20.)^2 ;just an example
!P.Multi=[0,2,1]
cgplot, x, y
xfrac = cgScaleVector(findgen(256), 0, N_Elements(x)-1)
yy = Interpolate(y, xfrac)
cgplot, xfrac, yy, color='red'
!P.Multi=0
END


Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: medical image reconstruction
Next Topic: NetCDF: Converting time variable using start time from "units"

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

Current Time: Wed Oct 08 11:35:40 PDT 2025

Total time taken to generate the page: 0.00420 seconds