| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Curve Fitting Toolbox |
| Contents | Index |
| Learn more about Curve Fitting Toolbox |
ci = confint(fitresult)
ci = confint(fitresult,level)
ci = confint(fitresult) returns 95% confidence bounds ci on the coefficients associated with the cfit or sfit object fitresult. fitresult must be an output from the fit function to contain the necessary information for ci. ci is a 2-by-n array where n = numcoeffs(fitresult). The top row of ci contains the lower bound for each coefficient; the bottom row contains the upper bound.
ci = confint(fitresult,level) returns confidence bounds at the confidence level specified by level. level must be between 0 and 1. The default value of level is 0.95.
To calculate confidence bounds, confint uses R-1 (the inverse R factor from QR decomposition of the Jacobian), the degrees of freedom for error, and the root mean squared error. This information is automatically returned by the fit function and contained within fitresult.
If coefficients are bounded and one or more of the estimates are at their bounds, those estimates are regarded as fixed and do not have confidence bounds.
Note that you cannot calculate confidence bounds if category(fitresult) is 'spline' or 'interpolant'.
load census
fitresult = fit(cdate,pop,'poly2')
fitresult =
Linear model Poly2:
fitresult(x) = p1*x^2 + p2*x + p3
Coefficients (with 95% confidence bounds):
p1 = 0.006541 (0.006124, 0.006958)
p2 = -23.51 (-25.09, -21.93)
p3 = 2.113e+004 (1.964e+004, 2.262e+004)
ci = confint(fitresult,0.95)
ci =
0.0061242 -25.086 19641
0.0069581 -21.934 22618Note that fit and confint display the confidence bounds in slightly different formats.
![]() | coeffvalues | datastats | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |