la.m
来自「fit programme for a serials of data」· M 代码 · 共 16 行
M
16 行
function y1=L(x,y,x1)
% input x is a vector that contains a list of abscissas
% y is a vector that cntains a list of ordinates
% x1 is the number at where the interpolation is to be obained
% output y1 is the la interpolation at x1
n=length(y);
y1=0;
for k=1:n
p=1;
for j=1:n
if j~=k
p=p*(x1-x(j))/(x(k)-x(j));
end
end
y1=y1+p*y(k);
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?