[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

INTERPOLATE



Maybe it's me, but this seems wrong...



IDL> foo = [[1000.0, 1000.0],[-1000.0, -1000.0]] 
IDL> print, foo 
      1000.00      1000.00 
     -1000.00     -1000.00 

IDL> x = [0.0, 0.5, 1.0] 

IDL> bar = interpolate(foo, x, x,/grid) 
IDL> print, bar 
      1000.00      1000.00      1000.00 
      0.00000      0.00000      0.00000 
     -1000.00     -1000.00     -1000.00 

IDL> y = findgen(4) / 3 
IDL> print, y 
      0.00000     0.333333     0.666667      1.00000 

IDL> bleeble = interpolate(bar, y, y, /grid) 

IDL> print, foo 
      1000.00      1000.00 
     -1000.00     -1000.00 
IDL> print, bar 
      1000.00      1000.00      1000.00 
      0.00000      0.00000      0.00000 
     -1000.00     -1000.00     -1000.00 
IDL> print, bleeble 
      1000.00      1000.00      1000.00      1000.00 
      666.667      666.667      666.667      666.667 
      333.333      333.333      333.333      333.333 
      0.00000      0.00000      0.00000      0.00000 

??? Where's my -1000 values gone?
-- 
Michael Cugley (mjcugley@medphys.dundee.ac.uk)