当前位置:网站首页>【插值与拟合】
【插值与拟合】
2022-07-31 07:38:00 【是数学系的小孩儿】
插值

x0=[0 3 5 7 9 11 12 13 14 15];
y0=[0 1.2 1.7 2.0 2.1 2.0 1.8 1.2 1.0 1.6];
x=0:0.1:15;
y1=interp1(x0,y0,x);
y2=interp1(x0,y0,x,'spline');%一维插值函数
pp1=csape(x0,y0);
y3=fnval(pp1,x);
pp2=csape(x0,y0,'second');
y4=fnval(pp2,x);
[x',y1',y2',y3',y4']
subplot(1,3,1)
plot(x0,y0,'+',x,y1)
xlabel('x方向')
ylabel('y方向')
title('分段线性插值')
%%
subplot(1,3,2)
plot(x0,y0,'+',x,y2)
xlabel('x方向')
ylabel('y方向')
title('立方样条插值')
%%
subplot(1,3,3)
plot(x0,y0,'+',x,y3)
xlabel('x方向')
ylabel('y方向')
title('立方样条插值有边界条件,边界为二阶导数')
%%
dx=diff(x);
dy=diff(y3);
dy_dx=dy./dx;
dy_dx0=dy_dx(1)
ytemp=y3(131:151);
ymin=min(ytemp);
index=find(y3==ymin);
xmin=x(index);
[xmin,ymin]

边栏推荐
- 48页智慧城市规划蓝图 解决方案
- MySQL table creation statement_Three commonly used MySQL table creation statements
- Embedded system driver primary [2] - _ parameters and dependencies under the kernel module
- PHP中 比较 0、false、null,‘‘ “
- NK - RTU980 burning bare-metal program
- TypeError The view function did not return a valid response. The function either returned None 的解决
- 实用生物信息学2:多组学数据整合和挖掘
- Ubuntu22.04安装mysql
- ‘vite‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
- MySql数据库优化查询工具
猜你喜欢

DAY18: XSS vulnerability

NK-RTU980烧写裸机程序

Vue项目通过node连接MySQL数据库并实现增删改查操作
![[Interview: Concurrency 37: Multithreading: Thread Pool] Custom Thread Pool](/img/61/71131414c48bb77aa9160b61a68811.png)
[Interview: Concurrency 37: Multithreading: Thread Pool] Custom Thread Pool

2704:寻找平面上的极大点

"C language game" entry-level chess game (robot enhanced version)

MySql数据库优化查询工具

手把手教你开发微信小程序自定义底部导航栏

2022.07.13_Daily Question

PHP中 比较 0、false、null,‘‘ “
随机推荐
New in Visual Studio: Low Priority Builds
使用PageHelper实现分页查询(详细)
MySQL installation to the last step in the write the configuration file failed?And after the installation steps
Shellshock
2022.07.15_Daily Question
Embedded system driver primary [2] - _ parameters and dependencies under the kernel module
"The C language games" mine clearance
2022.07.24_Daily Question
Yu Mr Series 】 【 2022 July 022 - Go Go teaching course of container in the dictionary
进程调度的基本过程
关于yum源的配置及更新
Vulkan与OpenGL对比——Vulkan的全新渲染架构
DAY18:XSS 漏洞
tqdm库的使用
第9章 异常try...except...else...finally
ros little turtle drawing
2022.07.29_Daily Question
Super detailed mysql database installation guide
DAY18: Xss Range Clearance Manual
MySql 5.7.38下载安装教程 ,并实现在Navicat操作MySql