Function: spline1 Purpose: 1D cubic spline interpolation. Category: MATH File: spline.c Author: P.R. Roelfsema Use: INTEGER SPLINE1( XI , Input real( > NIN ) YI , Input real( > NIN ) NIN , Input integer XO , Input real( > NOUT ) YI , Output real( > NOUT ) NOUT , Output integer SPLINE1 returns error codes: >0 - number of undefined values in YI. 0 - no problems. -1 - not enough memory to create internal tables. -2 - the input array has two equal x-coordinates or value in XO outside range of input coordinates > interpolation problems. XI Array containing input x-coordinates. YI Array containing input y-coordinates. NIN Number of (XI,YI) coordinate pairs. XO Array containing x-coordinates for which y-coordinates are to be interpolated. YO Array containing interpolated y-coordinates. If ALL YI are undefined, ALL YO are set to undefined. NOUT Number of x-coordinates for which interpolation is wanted. Description: The interpolation is based on the cubic spline interpolation routines described in "Numerical recipes in C". For the interpolation data points in YI wich are undefined are skipped. Thus if undefined values are present, this routine will interpolate across them. XI data must be in increasing order. The number of undefined values in YI is returned. Updates: Jan 29, 1991: PRR, Creation date Aug 7, 1991: MV, Reset of 'klo' in 'spline1_c' Documentation about XI. Aug 9, 1993: PRR, Set YO to undefined when all YI undefined.