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!