📄 mksinc.cwp.lib
字号:
MKSINC - Compute least-squares optimal sinc interpolation coefficients.mksinc Compute least-squares optimal sinc interpolation coefficients.Function Prototype:void mksinc (float d, int lsinc, float sinc[]);Input:d fractional distance to interpolation point; 0.0<=d<=1.0lsinc length of sinc approximation; lsinc%2==0 and lsinc<=20Output:sinc array[lsinc] containing interpolation coefficientsNotes:The coefficients are a least-squares-best approximation to the idealsinc function for frequencies from zero up to a computed maximumfrequency. For a given interpolator length, lsinc, mksinc computesthe maximum frequency, fmax (expressed as a fraction of the nyquistfrequency), using the following empirically derived relation (froma Western Geophysical Technical Memorandum by Ken Larner): fmax = min(0.066+0.265*log(lsinc),1.0)Note that fmax increases as lsinc increases, up to a maximum of 1.0.Use the coefficients to interpolate a uniformly-sampled function y(i) as follows: lsinc-1 y(i+d) = sum sinc[j]*y(i+j+1-lsinc/2) j=0Interpolation error is greatest for d=0.5, but for frequencies lessthan fmax, the error should be less than 1.0 percent.Author: Dave Hale, Colorado School of Mines, 06/02/89
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -