How to get the R2 value of fit?

85 vues (au cours des 30 derniers jours)
Jen W
Jen W le 30 Nov 2022
In the code below, how to output the R2 value of the fitted coefficients?
ft = fittype('b*x^2+c*x+a');
load enso
fit(month,pressure,ft,'StartPoint',[1,3,5])

Réponse acceptée

Stephan
Stephan le 30 Nov 2022
ft = fittype('b*x^2+c*x+a');
load enso
[curve, gof]=fit(month,pressure,ft,'StartPoint',[1,3,5])

Plus de réponses (0)

Catégories

En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by