Make equation in Curve Fitting tool
1 回表示 (過去 30 日間)
古いコメントを表示
I used the Curve Fitting tool to plot the relationship between x, y and z.
Could I get the equation corresponding to the graph above?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/351260/image.png)
2 件のコメント
dpb
2020 年 8 月 25 日
Use the "Save" feature and then the fit object will be copied into the workspace and you can query it for properties. See the doc on postprocessing for the methods/properties...
Alex Sha
2020 年 8 月 25 日
How about the equation below:
z = p1*exp(p2/x+p3*y)+p4+p5*x*y;
Root of Mean Square Error (RMSE): 0.157691882577852
Sum of Squared Residual: 0.870335544083149
Correlation Coef. (R): 0.9793870899808
R-Square: 0.95919907202106
Adjusted R-Square: 0.955250595119872
Parameter Best Estimate
---------- -------------
p1 100030.165298487
p2 -66.5201897439939
p3 -0.0404908844574984
p4 -0.331541416588136
p5 0.00106610586563368
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/351377/image.jpeg)
回答 (1 件)
Divija Aleti
2020 年 8 月 31 日
As Alex stated, it will be possible to tune the parameters of a predefined model, for example, by using ‘poly23’ fittype, to fit a curve through given data and get the output equation.
Have a look at the following link for possible ways to fit a curve or surface to data:
Output:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/354053/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/354056/image.png)
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!