scipy.interpolate.lagrange
来源:互联网 发布:数据库触发器工作原理 编辑:程序博客网 时间:2024/06/05 07:37
拉格朗日插值法是scipy库中常用的插值方法。
官网定义如下:
scipy.interpolate.lagrange(x, w)[source]Return a Lagrange interpolating polynomial.Given two 1-D arrays x and w, returns the Lagrange interpolating polynomial through the points (x, w).Warning: This implementation is numerically unstable. Do not expect to be able to use more than about 20 points even if they are chosen optimally.Parameters:x : array_likex represents the x-coordinates of a set of datapoints.w : array_likew represents the y-coordinates of a set of datapoints, i.e. f(x).Returns:lagrange : numpy.poly1d instanceThe Lagrange interpolating polynomial.其参数为两个一维数组,分别代表坐标的x值和y值,输出是多项式。可以直接用了计算插值。
例如:
x=[100,200,300,400]
y=[10,20,30,40]
f=lagrange(x,y)
求在500处的插值f(500)得到49.999999999999837,符号我们的数据
Warning: This implementation is numerically unstable. Do not expect to be able to use more than about 20 points even if they are chosen optimally.这方法不是很稳定,所有输入的数据点最好不要超过20个
1 0
- scipy.interpolate.lagrange
- python-scipy.interpolate.lagrange的简介
- lagrange
- Lagrange
- Interpolate-Curve
- polynomial interpolate
- SciPy
- SciPy
- SciPy
- SciPy
- AngularJS——Interpolate
- angular的$interpolate服务
- angularjs中的$interpolate服务
- Lagrange multiplier
- 拉格朗日插值法(Lagrange)
- Lagrange插值法
- Lagrange multipliers
- Angualrjs插值字符串$interpolate
- oracle官网下载java8文档
- Hadoop集群安装
- 当当笔试题(有n个人成一圈,顺序排号(编号为1到n),从第一个人开始报数1到3报数),凡报到3的人出圈子,从下个人开始继续报数,直到最后一个人,问最后留下在是第几号?)
- 单例设计模式
- 如何让UDP实现可靠传输
- scipy.interpolate.lagrange
- 进程的5种终止方式
- 拓扑排序(给任务排序,UVA 10305)
- Markdown标记语言语法及使用实例
- Spring,hibernate,struts经典面试笔试题及其参考答案
- 让你快速学习python基础笔记003(一起动手实践)
- JS中的prototype
- Android Handler源码剖析
- 二叉树的遍历(递归与非递归)java实现