How do I work with CFIT objects in curve fitting?
조회 수: 3 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2009년 6월 27일
편집: MathWorks Support Team
2022년 10월 8일
How do I work with CFIT objects in curve fitting?
채택된 답변
MathWorks Support Team
2022년 10월 8일
편집: MathWorks Support Team
2022년 10월 8일
You can use the function CONFINT to find confidence intervals. Full documentation on this function is available at
Here is an example. Suppose that we have exported a fitted model from CFTOOL to the workspace.
fittedmodel1 =
General model:
fittedmodel1(x) = a*sin(x) + b
Coefficients (with 95% confidence bounds):
a = 1.018 (0.938, 1.097)
b = -0.03808 (-0.09455, 0.01839)
Now use CONFINT to get confidence intervals:
confint(fittedmodel1)
ans =
0.9380 -0.0946
1.0973 0.0184
Here, the first column is the 95% confidence interval on the first parameter and the second column is the 95% confidence interval on the second parameter. A second input to CONFINT can give other levels of confidence.
To get the actual parameter values, use structure indexing. For example, parameter a could be found by typing
fittedmodel1.a
Another function of interest is PREDINT, to find prediction intervals. Full documentation for this function is available at
댓글 수: 1
Steven Lord
2021년 2월 17일
For a list of other operations you can perform with cfit and sfit objects see this documentation page.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Fit Postprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!