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 #41926 is a reply to message #41925] Wed, 01 December 2004 00:23 Go to previous messageGo to previous message
Chris Lee is currently offline  Chris Lee
Messages: 101
Registered: August 2003
Senior Member
In article <MPG.1c16c3fd524557b998988c@news.frii.com>, "David Fanning"
<davidf@dfanning.com> wrote:

...
> 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
> How in the world to *those* numbers, when applied to A, produce the
> result I get? Seems like magic to me. :-( Cheers,
> David
>

It looks like IDL is flooring the numbers (or just dropping the floating
point part) to make them INTs.

IDL> a=[0,10,20,30]
IDL> print, interpolate(a,findgen(12)*3/11.)
0 2 5 8 10 13 16 19 21
24 27 30

IDL> print, interpolate(a*1.0,findgen(12)*3/11.)
0.00000 2.72727 5.45455 8.18182 10.9091 13.6364
16.3636 19.0909 21.8182 24.5455 27.2727 30.0000

IDL> print, interpol(a, 12)
0.00000 2.72727 5.45455 8.18182 10.9091 13.6364
16.3636 19.0909 21.8182 24.5455 27.2727 30.0000


Chris.
[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: Sat Oct 11 03:40:10 PDT 2025

Total time taken to generate the page: 0.80084 seconds