当前位置:网站首页>【插值与拟合】
【插值与拟合】
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]

边栏推荐
- 安装部署KubeSphere管理kubernetes
- DAY18: Xss Range Clearance Manual
- Ubuntu安装Mysql5.7
- MySQL 5.7 安装教程(全步骤、保姆级教程)
- 2022.07.22 _ a day
- Unreal基础概念
- Read Elephant Swap in one article, why does it bring such a high premium to ePLATO?
- Install the deployment kubernetes KubeSphere management
- MySQL 8.0.29 解压版安装教程(亲测有效)
- Docker-compose安装mysql
猜你喜欢

分布式缓存系统必须要解决的四大问题
![[Interview: Concurrency 38: Multithreading: Thread Pool] Basic concepts of the ThreadPoolExecutor class](/img/b2/c53b72a151b1277aee5aeb65c61cf7.png)
[Interview: Concurrency 38: Multithreading: Thread Pool] Basic concepts of the ThreadPoolExecutor class

全国中职网络安全B模块之国赛题远程代码执行渗透测试 PHPstudy的后门漏洞分析

超级详细的mysql数据库安装指南

Read Elephant Swap in one article, why does it bring such a high premium to ePLATO?

中软国际携手深开鸿发布(1+1) x N 战略,以数字化、智慧化改变人类生产和生活方式

How to set the computer password?How to add "safety lock" to your computer

"The C language games" mine clearance

进程调度的基本过程

Shell编程之条件语句
随机推荐
2022.07.18 _ a day
2022.07.15_Daily Question
van-uploader上传图片,使用base64回显无法预览的问题
google搜索技巧——程序员推荐
mysql安装教程【安装版】
NK - RTU980 burning bare-metal program
XSS详解
MySQL table creation statement_Three commonly used MySQL table creation statements
48页智慧城市规划蓝图 解决方案
《C语言小游戏》扫雷
New in Visual Studio: Low Priority Builds
2022.07.18 _ a day
[PSQL] Complex query
navicat 新建数据库
控制文本保留几行,末尾省略
初识NK-RTU980开发板
ros小乌龟画图
[PSQL] SQL Basic Course Reading Notes (Chapter1-4)
mysql的建表语句_三种常用的MySQL建表语句
Vue项目通过node连接MySQL数据库并实现增删改查操作