hermpol.m

来自「小的源码Matlab编程」· M 代码 · 共 14 行

M
14
字号

function yi = Hermpol(ga, gb, dga, dgb, a, b, xi)

% Two-point cubic Hermite interpolant. Points of interpolation
% are a and b. Values of the interpolant and its first order
% derivatives at a and b are equal to fa, fb, dfa and dfb.
% Vector yi holds values of the interpolant at the points xi.

h = b - a;
t = (xi - a)./h;
t1 = 1 - t;
t2 = t1.*t1;
yi = (1 + 2*t).*t2*ga + (3 - 2*t).*(t.*t)*gb+...
   h.*(t.*t2*dga + t.^2.*(t - 1)*dgb);

⌨️ 快捷键说明

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