How to plot curve fitting for this given values ?
3 ビュー (過去 30 日間)
古いコメントを表示
MD MOSTAKIM ALAM SOHAG
2021 年 3 月 13 日
コメント済み: MD MOSTAKIM ALAM SOHAG
2021 年 3 月 13 日
I need one curve fitting for this givene set of data and also need the formula for this curve fitting. Please see the given value below. please help me .i plot it in matlab .
x=[821,1038,1161,1368,1730,1934,2188,2768];
y1=[0.44,0.38,0.37,0.32,0.29,0.28,0.25,0.24];
y2=[0.47,0.4,0.38,0.34,0.29,0.29,0.26,0.23];
y3=[0.50,0.41,0.38,0.35,0.30,0.30,0.27,0.24];
y4=[0.51,0.43,0.4,0.39,0.31,0.3,0.28,0.25];
hold on
plot(x,y1,'ro');
plot(x,y2,'ks');
plot(x,y3,'b^');
plot(x,y4,'gd');
hold off
3 件のコメント
Alex Sha
2021 年 3 月 13 日
The function below is good enough:
y = p1+p2*x+p3*x^p4
for y1:
Root of Mean Square Error (RMSE): 0.00609474296398704
Sum of Squared Residual: 0.000297167134376556
Correlation Coef. (R): 0.995657107969209
R-Square: 0.991333076649609
Parameter Best Estimate
---------- -------------
p1 -18.2131020720014
p2 9.57653871989359E-5
p3 20.8644903534028
p4 -0.017329560162132
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/548153/image.jpeg)
for y2:
Root of Mean Square Error (RMSE): 0.00487132856581337
Sum of Squared Residual: 0.000189838735968874
Correlation Coef. (R): 0.997895473901685
R-Square: 0.995795376833469
Parameter Best Estimate
---------- -------------
p1 0.218720912793765
p2 -1.98776371053174E-5
p3 580.697423913121
p4 -1.14490530579968
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/548158/image.jpeg)
for y3:
Root of Mean Square Error (RMSE): 0.00450490478695767
Sum of Squared Residual: 0.000162353337116433
Correlation Coef. (R): 0.998381221912087
R-Square: 0.996765064266671
Parameter Best Estimate
---------- -------------
p1 0.365629108368326
p2 -4.83474991708937E-5
p3 5327591.03780687
p4 -2.56877144493591
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/548163/image.jpeg)
for y4:
Root of Mean Square Error (RMSE): 0.00928461654410123
Sum of Squared Residual: 0.000689632834967986
Correlation Coef. (R): 0.99365149000932
R-Square: 0.987343283597743
Parameter Best Estimate
---------- -------------
p1 -0.117602242450941
p2 2.01063745044263E-5
p3 24.7010626607665
p4 -0.552041317148681
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/548168/image.jpeg)
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Linear and Nonlinear Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!