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

Home » Public Forums » archive » Re: REBIN needs explaining
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: REBIN needs explaining [message #41925 is a reply to message #41924] Wed, 01 December 2004 00:38 Go to previous messageGo to previous message
b.hinrichsen is currently offline  b.hinrichsen
Messages: 2
Registered: January 2004
Junior Member
David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1c16c3fd524557b998988c@news.frii.com>...
> JD Smith writes:
>
>> So here it has just 1 interval producing 10 points, and 10 points are
>> duplicated from the last value. The manual also recommends the
>> solution:
>>
>> If this effect is undesirable, use the INTERPOLATE function.
>
> Well, I *would* use the INTERPOLATE function if I could
> understand it. :-(
>
> The REBIN documentation says this:
>
> *************************************************
> ; A four point vector:
> A = [0, 10, 20, 30]
>
> ; Expand by a factor of 3:
> B = REBIN(A, 12)
>
> PRINT, B
> IDL prints:
>
> 0 3 6 10 13 16 20 23 26 30 30 30
>
> Note that the last element is repeated three times. If this effect is
> undesirable, use the INTERPOLATE function. For example, to produce 12
> equally spaced interpolates from the interval 0 to 30:
>
> B = INTERPOLATE(A, 3./11. * FINDGEN(12))
> PRINT, B
> IDL prints:
>
> 0 2 5 8 10 13 16 19 21 24 27 30
> *************************************************
>
> But,
>
> IDL> Print, 3./11. * FINDGEN(12))
> 0.000000 0.272727 0.545455 0.818182 1.09091
> 1.36364 1.63636 1.90909 2.18182 2.45455 2.72727
> 3.00000
Interpolate considers these values as the new x-array which determines
the values of the y-array. The original x-array is implicitly
understood to be the index of A viz. [0,1,2,3].
>
> How in the world to *those* numbers, when applied to A, produce
> the result I get? Seems like magic to me. :-(
>
> Cheers,
>
> David

Greetings,

Bernd
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: applications guis and licenses
Next Topic: Re: applications guis and licenses

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

Current Time: Sun Oct 12 17:28:12 PDT 2025

Total time taken to generate the page: 1.35826 seconds