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

Home » Public Forums » archive » Re: Congrid and interpolate problem!
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: Congrid and interpolate problem! [message #65404 is a reply to message #65397] Sun, 01 March 2009 07:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
d.poreh@gmail.com writes:

> I have got a problem and couldn't solve it. Let I have an array:
> arr=3Dx,y and x is location indicator and y is my function. My data is
> something like this:
> x=1,2,3,4,..,999,1000
> y=1,2,3,5,5,5,...5,200
> And size(x)=size(y). I want to interpolate y to remove the 5s to take
> continues value for each location (x). I used congrid and interpolate
> function but still doesn't work. Any help?

I would do it like this:

s = N_Elements(y)
min = Min(y, MAX=max)
y = Scale_Vector(Indgen(s), min, max)

You can find Scale_Vector here:

http://www.dfanning.com/programs/scale_vector.pro

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
Previous Topic: 1e38 limit?
Next Topic: Help on ENVI

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

Current Time: Fri Oct 10 08:03:45 PDT 2025

Total time taken to generate the page: 0.64209 seconds