How do I work with CFIT objects in curve fitting?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 27 de Jun. de 2009
Editada: MathWorks Support Team
el 8 de Oct. de 2022
How do I work with CFIT objects in curve fitting?
Respuesta aceptada
MathWorks Support Team
el 8 de Oct. de 2022
Editada: MathWorks Support Team
el 8 de Oct. de 2022
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 comentario
Steven Lord
el 17 de Feb. de 2021
For a list of other operations you can perform with cfit and sfit objects see this documentation page.
Más respuestas (0)
Ver también
Categorías
Más información sobre Fit Postprocessing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!