def analysis.spline.cubeinterpolate (   xlist,
  ylist,
  x3 
)

Definition at line 136 of file spline.py.

00136                                      :
00137     "find point at x3 given 4 points in given lists using exact cubic interpolation, not splining"
00138     x1,x2,x4,x5=xlist
00139     x2,x3,x4,x5=float(x2-x1),float(x3-x1),float(x4-x1),float(x5-x1)
00140     y1,y2,y4,y5=ylist
00141     y2,y4, y5=float(y2-y1),float(y4-y1),float(y5-y1)
00142     
00143     y3=(
00144             (x3*(x2**2*x5**2*(-x2 + x5)*y4 + x4**3*(x5**2*y2 - x2**2*y5) + x4**2*(-(x5**3*y2) + x2**3*y5) + 
00145                    x3**2*(x2*x5*(-x2 + x5)*y4 + x4**2*(x5*y2 - x2*y5) + x4*(-(x5**2*y2) + x2**2*y5)) + 
00146                    x3*(x2*x5*(x2**2 - x5**2)*y4 + x4**3*(-(x5*y2) + x2*y5) + x4*(x5**3*y2 - x2**3*y5))))/
00147                  (x2*(x2 - x4)*x4*(x2 - x5)*(x4 - x5)*x5)
00148     )+y1
00149     return y3
00150 
from analysis import fitting_toolkit


Generated on Wed Nov 21 10:18:33 2007 for analysis by  doxygen 1.5.4