intcub.cwp.lib
来自「su 的源代码库」· LIB 代码 · 共 33 行
LIB
33 行
INTCUB - evaluate y(x), y'(x), y''(x), ... via piecewise cubic interpolationintcub evaluate y(x), y'(x), y''(x), ... via piecewise spline interpolationFunction Prototype:void intcub (int ideriv, int nin, float xin[], float ydin[][4],Input:ideriv =0 if y(x) desired; =1 if y'(x) desired, ...nin length of xin and ydin arraysxin array[nin] of monotonically increasing or decreasing x valuesydin array[nin][4] of y(x), y'(x), y''(x), and y'''(x)nout length of xout and yout arraysxout array[nout] of x values at which to evaluate y(x), y'(x), ...Output:yout array[nout] of y(x), y'(x), ... valuesNotes:xin values must be monotonically increasing or decreasing.Extrapolation of the function y(x) for xout values outside the rangespanned by the xin values is performed using the derivatives in ydin[0][0:3] or ydin[nin-1][0:3], depending on whether xout is closestto xin[0] or xin[nin-1], respectively.Reference:See: Greville, T. N., Theory and Application of Spline Functions, Academic Pressfor a general discussion of spline functions.Author: Dave Hale, Colorado School of Mines, 06/02/89
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?