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!