The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... 
Home MathPack Math2 Procedures and Functions PenalizedCubicSpline  
See also: PolynomialSmooth, SmoothedSpline  
PenalizedCubicSpline 

The procedure PenalizedCubicSpline calculates a penalized cubic spline for n2n1+1 data points as it has been published by C.H.Reinsch [Num.Math. 10 (1967) 177]. The parameters n1 and n2 are the lower and the upper index of the range of data to be included in the calculation. The x and yvalues of the data are stored in the arrays x and y. The array dy contains the relative importance of the corresponding points. Please note that the following inequality must hold true: which means that you cannot use the first point of the data array (x[0]y[0]) for calculating the spline function. The parameter smooth controls the extent of smoothing and must be greater or equal to zero. A zero value means no smoothing. Please note that the parameter smooth and the array dy depend on each other. Recommended values for dy are the estimated standard deviations of the ordinate for a given xvalue. In this case useful values for the smooth parameter lie within the interval n +/ sqrt(2n), with n being the number data points used for the approximation. On return the variable arrays a, b, c, and d contain the smoothed spline parameters. In order to calculate the spline result for a particular argument xx one first has to calculate the difference between xx and the next lower value of the array x (index ix). Then the function result is given by f(xx) = ((d[ix]*h + c[ix])*h + b[ix])*h + a[ix]
