Polyfit Vs Fit command: what are the differences?

조회 수: 108 (최근 30일)
PRB
PRB 2020년 5월 15일
댓글: PRB 2020년 5월 26일
I would like to predict a quadratic curve (y=ax2 + bx + c) from a data set and the relative goodness of the fit model.
I used both the command polyfit (Polynomial curve fitting) and Fit (Fit the curve).
what is the difference between the two methods? Whit the second method I used 'normalize' but when I try to find the value with polyval the predicted data are no correct.
How can I test the goodness of the fit model if I use the command Poltyfit?
Thank you in advance

채택된 답변

Jyotsna Talluri
Jyotsna Talluri 2020년 5월 25일
Refer the below link to know the differences betwween fit and polyfit
We cannot determine the goodness of fit using polyfit.Use fit function to determine the goodness of fit.
[fitobject,gof] = fit(x,y,fitType)
returns goodness-of-fit in the structure gof.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by