Get my X and Y values from curve fitting tool
77 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Cameron
el 13 de En. de 2023
Editada: Cameron
el 13 de En. de 2023
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 comentarios
Matt J
el 13 de En. de 2023
Editada: Matt J
el 13 de En. de 2023
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)
Ver también
Categorías
Más información sobre Linear and Nonlinear Regression en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!