How to get the R2 value of fit?
120 views (last 30 days)
Show older comments
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])
0 Comments
Accepted Answer
Stephan
on 30 Nov 2022
ft = fittype('b*x^2+c*x+a');
load enso
[curve, gof]=fit(month,pressure,ft,'StartPoint',[1,3,5])
0 Comments
More Answers (0)
See Also
Categories
Find more on Linear and Nonlinear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!