Get my X and Y values from curve fitting tool
77 次查看(过去 30 天)
显示 更早的评论
First of all i´m completely new on matlab so forgive me if this is a dumb question... I had a curve fitting problem for my project and curve fit was completed using using custom fit equation and got a very nice fit.
The equation used for curve fitting was Y=1-((1-(X)^B)^A). R2 value I got around 95% and the co-effiecent value I got was A =0.6454 (0.5501, 0.7407) and B =0.1164 (0.09036, 0.1425)
Now I need the values of the X axis and Y axis Data of the fitted curve so I wonder if there is a fast and simple way to get them.
Please reply to my question immedieately. Any help will be appriciated.
2 个评论
回答(1 个)
Cameron
2023-1-13
编辑:Cameron
2023-1-13
If you are using the Curve Fitting App, go to Export in the top right and select Export to Workspace. Then select OK, and your information should be in the fittedmodel variable.
fittedmodel.p1
fittedmodel.p2
%or
fittedmodel.A
fittedmodel.B
2 个评论
Matt J
2023-1-13
编辑:Matt J
2023-1-13
The fitting process does not generate any X,Y data post-fit. However, the fittedmodel object that you export can be used to evaluate the fitted curve at any X values you wish. For example, if xdata,ydata are the data that you used to perform the fit, then you could do,
X=linspace(min(xdata), max(xdata),1000);
Y=fittedmodel(X)
另请参阅
类别
在 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!