当前位置:网站首页>Matlab least square fitting
Matlab least square fitting
2022-07-22 05:36:00 【studyer_ domi】
1、 Content abstract
A little
414- Can communicate 、 consulting 、 Answering question
2、 Content description
A little
3、 Simulation analysis
close all
clear
clc
x=2:15;
y=[6.42,8.20,9.58,9.50,9.70,10.00,9.93,9.99,10.49,10.59,10.60,10.80,10.60,10.9];
p = polyfit(x,y,6);
x1 = 2:0.01:15;
y1 = polyval(p,x1);
figure
plot(x,y,'*',x1,y1,'r')
xlabel 'x Axis '
ylabel 'y Axis '
title(' least square polyfit Fitting diagram ')
figure
bar(x,polyval(p,x)-y)
xlabel 'x Axis '
ylabel ' residual '
title(' least square polyfit Fitting diagram ')
k = length(x);
X=[ones(k,1) x' x.^2' x.^3'];
[b, bint, r, rint, stats] = regress(y',X);
x2 = 2:0.01:15;
y2 = b(1)+b(2)*x2+x2.^2*b(3)+x2.^3*b(4);
figure
plot(x,y,'*',x2,y2,'r')
xlabel 'x Axis '
ylabel 'y Axis '
title(' least square regress Fitting diagram ')
figure
bar(x,r)
xlabel 'x Axis '
ylabel ' residual '
title(' least square regress Fitting diagram ')
4、 Reference paper
A little
边栏推荐
- Using symbol, ES6 is a new method to obtain key value
- You are only one SQL statement away from the tdengine Developer Conference!
- 干货!高并发下秒杀商品,你必须知道的9个细节
- ES6 from getting started to mastering 05: extended operators and arrow functions of functions
- 通用Service + 多线程完美解决批处理问题
- 2.3.1 View绘制流程
- Microservice technology development
- Addition, deletion and modification of MySQL database and table
- Several problems faced by long-term remote work and continuous improvement of organizational automation
- 光伏发电系统及其MPPT控制
猜你喜欢
Ros2 learning notes: Launch script
【综合笔试题】难度 3.5/5,多解法热门二叉树笔试题
LeetCode·每日一題·814.二叉樹剪枝·遞歸
虚拟机无法连接互联网
Windows cannot start the mysql80 service (located on the local computer)
ES6 from getting started to mastering 05: extended operators and arrow functions of functions
BGP基础配置,聚合,反射器
分享一篇关于 Canvas 的入门指南
FTP service and configuration
Performance area: the more you know, the more you don't know
随机推荐
Using symbol, ES6 is a new method to obtain key value
容器学习中的简答题
通用Service + 多线程完美解决批处理问题
计算机考研数据库题库
Yousi College | learn six sigma management from Sun Tzu's art of war
Win11如何增强麦克风?Win11增强麦克风的设置
Pl/sql exception
814. Binary tree pruning: simple recursive problem
如何快速的将 DataTable 导入到 Excel 中 ?
Tensorflow入门教程(三十三)——图像分割损失函数FocalLoss
【攻防世界WEB】难度一星3分入门题:get、post、robots、、cookie、button、weak、php、web、unserialize
[attack and defense world web] difficulty 1-star 3-point introductory questions: get, post, robots,, cookies, buttons, weak, PHP, web, serialize
PL marker (ACL 2022) - New SOTA of information extraction (ner+re), paper analysis and code browsing
MySQL logical architecture
ES6 from introduction to mastery 01:es6 introduction
C OPC client code
Leetcode-179-max
Isn't it hard? You hit me! Hands on teaching!
Addition, deletion and modification of MySQL database and table
并联型模糊PID复合控制器的simulink建模与仿真