mkdiff.cwp.lib

来自「su 的源代码库」· LIB 代码 · 共 37 行

LIB
37
字号
MKDIFF - Make an n-th order DIFFerentiator via Taylor's series method.mkdiff		make discrete Taylor series approximation to n'th derivative.Function Prototype:void mkdiff (int n, float a, float h, int l, int m, float d[]);Input:n		order of desired derivative (n>=0 && n<=m-l is required)a		fractional distance from integer sampling index (see notes)h		sampling intervall		sampling index of first coefficient (see notes below)m		sampling index of last coefficient (see notes below)Output:d		array[m-l+1] of coefficients for n'th order differentiatorNotes:The abscissae x of a sampled function f(x) can always be expressed asx = (j+a)*h, where j is an integer, a is a fraction, and h is thesampling interval.  To approximate the n'th order derivative fn(x)of the sampled function f(x) at x = (j+a)*h, use the m-l+1 coefficientsin the output array d[] as follows:	fn(x) = d[0]*f(j-l) + d[1]*f(j-l-1) +...+ d[m-l]*f(j-m)i.e., convolve the coefficients in d with the samples in f.m-l+1 (the number of coefficients) must not be greater than theNCMAX parameter specified below.For best approximations,when n is even, use a = 0.0, l = -mwhen n is odd, use a = 0.5, l = -m-1Author:  Dave Hale, Colorado School of Mines, 06/02/89

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?