Matlab Nevilles插值

本文介绍了Neville算法,一种用于在给定数据点上计算插值多项式的数学方法,通过递归步骤实现,给出Matlab代码示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

@Matlab

Neville’s Iterated Interpolation

In mathematics, Neville’s algorithm is a method of computing interpolating polynomials, developed by mathematician Eric Harold Neville.

Algorithm step

To evaluate the interpolating polynomial P on the n + 1 distinct numbers x0,…,xn at the number x for the function f:

Input
numbers x,x0,x1,…xn;
values f(x0),f(x1),…,f(xn) as the first column Q0,0,Q1,0,…,Qn,0 of Q.
Output
the table Q with P(x)=Qn,n.

Step prompt
Step 1
for i = 1,2,…,i
for j = 1,2,…,j
set Qi,j=((x-xi-j)Qi,j-1-(x-xi)Qi-1,j-1)/(xi-xi-j).

Step 2
Output(Q)
Stop

The code is as follows


function feval = NevilleInterpolation(xs, fs, xeval)
n 
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值