当前位置:网站首页>Polynomial interpolation fitting (III)
Polynomial interpolation fitting (III)
2022-07-19 03:09:00 【HySmiley】
Third order polynomial interpolation ( Cubic interpolation ):
fx=ax^3+bx^2+cx+d
interp1d(x,y,kind='cubic') 'cubic' Cubic interpolation
import numpy as np
from scipy.interpolate import interp1d,interp2d
import pylab as pl
x=np.array([1,2,3,4,5])
y=np.array([1,4,2,4,1]) #Y=x^3+x^2+x+1
fc=interp1d(x,y,kind='cubic')
xint=np.linspace(x.min(),x.max(),20)
print(xint)
print(fc(xint))
pl.scatter(xint,fc(xint),c='r',marker='o')
pl.plot(xint,fc(xint),color='blue',label='Cubic-10')
pl.show()
Interpolation point :
xint [1. 1.21052632 1.42105263 1.63157895 1.84210526 2.05263158
2.26315789 2.47368421 2.68421053 2.89473684 3.10526316 3.31578947
3.52631579 3.73684211 3.94736842 4.15789474 4.36842105 4.57894737
4.78947368 5. ]
y: [1. 2.71628517 3.73859163 4.19288526 4.20513194 3.90129757
3.40734801 2.84924916 2.3529669 2.04446712 2.04446712 2.3529669
2.84924916 3.40734801 3.90129757 4.20513194 4.19288526 3.73859163
2.71628517 1. ]
边栏推荐
- 3. Asynctool framework principle source code analysis
- 【模板记录】字符串哈希判断回文串
- Introduction to wangeditor (entry level)
- 自动装配 & 集合注入
- What happens when you get stuck compiling and installing MySQL database in Linux system?
- LETV has more than 400 employees? Living a fairy life without a boss, the official responded
- [MCU simulation] (V) addressing mode - immediate addressing and register indirect addressing
- 1. Introduction, analysis and implementation of asynctool framework
- 05_服务调用Ribbon
- SQL经典练习题(x30)
猜你喜欢

zsh: command not found: mysql

GraphQL初识

OpenVINO中的FCOS人脸检测模型代码演示

Letv a plus de 400 employés? Le jour de l'immortel sans patron, les autorités ont répondu...

JDBC连接Mysql数据库

3. Asynctool framework principle source code analysis

樂視還有400多比特員工?過著沒有老板的神仙日子 官方出來回應了...

多项式插值拟合(二)
![[MCU simulation] (XX) org - set start address](/img/9e/4e44dd779b0de28a190d86fbb1c2c0.png)
[MCU simulation] (XX) org - set start address

工具及方法 - Excel插件XLTools
随机推荐
[MCU simulation] (VII) addressing mode - bit addressing
【NoSQL】redis高可用和持久化
05 central processing unit
Redis' simple dynamic string SDS
[MCU simulation] (XVII) control transfer instructions - call and return instructions
BiSeNetV2-面部分割 ncnn推理
[redis] what is progressive rehash
内置键盘连续444
乐视还有400多位员工?过着没有老板的神仙日子 官方出来回应了...
About XML file (VI) - the difference between JSON and XML file
【单片机仿真】(十四)指令系统位操作类指令 — 位数据传送指令MOV、位变量修改指令
SQL经典练习题(x30)
[MCU simulation] (XIX) introduction to assembly, assembly instructions, pseudo instructions
多项式插值拟合(一)
It's good to take more exercise
一个优酷VIP会员帐号可以几个人用的设备同时登录如何共享多人使用优酷会员账号?
yolov5 opencv DNN 推理
while 循环
【单片机仿真】(十三)指令系统逻辑运算指令 — 移位指令
【剑指Offer】31-35题(判断一个序列是否是栈的出栈序列之一,层序打印二叉树以及分行打印、每行逆着打印),判断序列是否是二叉搜索树的后序遍历路径,二叉树找一条权值为K的路径,复制复杂链表