Uncertainty in values from Matlab Curve Fitting

In summary, the conversation is about using Matlab's Curve Fitting tool to fit data to exponential curves and how to calculate uncertainties for the fitted coefficients. The expert provides steps to enable the uncertainty calculation and recommends further resources for understanding error analysis and uncertainty calculation.
  • #1
tommyball
3
0
Hi-

I apologize if this has been covered elsewhere, but after much searching with no luck...

I am taking a lab class, the first in a while, and am using Matlab's Curve Fitting tool to fit data to exponential curves.

My question is how to translate (if possible) the "goodness of fit" data it returns into uncertainties in the returned coefficients.

For example, this is an exponential decay of the form:

a*(1-2*exp(-x/b))

I need to report the returned value for b with an uncertainty.

I have not had much schooling in statistics or error analysis, just a couple lectures 2 years ago covering sig figs and least squares. I'm just thinking that with all Matlab's Curve Fitting Toolbox can do, there has to be a way to produce an uncertainty for the coefficients.

Thank you,
T.
 
Physics news on Phys.org
  • #2


Hi T,

Thank you for your question. It is important to consider uncertainties when reporting your results, especially in scientific research. Fortunately, Matlab's Curve Fitting tool does have the capability to calculate uncertainties for your fitted coefficients. Here are the steps to do so:

1. After fitting your data to the exponential curve, select the "Curve Fit" tab at the top of the Curve Fitting window.

2. Under the "Fit Options" section, click on the "More Options" button.

3. In the new window that appears, select the "Coefficient Covariance" option under the "Output Options" section.

4. Click on the "Apply" button and then close the window.

5. Now, when you view the fit results, you will see a table that includes the values for your fitted coefficients as well as their corresponding uncertainties.

The uncertainties are calculated based on the covariance matrix, which takes into account the errors in your data points and the correlation between your fitted coefficients. I suggest looking into some resources on error analysis and uncertainty calculation for a better understanding of these concepts.

I hope this helps and best of luck with your lab class!
Scientist and Matlab User
 

FAQ: Uncertainty in values from Matlab Curve Fitting

1. How do I determine the uncertainty in my curve fitting results using Matlab?

To determine the uncertainty in your curve fitting results using Matlab, you can use the built-in function "confint" which calculates the confidence intervals for the fitted parameters. These intervals represent the range of values within which the true values of the parameters are likely to fall with a certain level of confidence.

2. What factors can contribute to uncertainty in curve fitting using Matlab?

There are several factors that can contribute to uncertainty in curve fitting using Matlab. These include measurement errors, noise in the data, variability in the underlying processes, and the choice of model and fitting parameters.

3. How can I visualize uncertainty in my curve fitting results using Matlab?

To visualize uncertainty in your curve fitting results using Matlab, you can use the "ploterr" function which plots the fitted curve along with the upper and lower bounds of the confidence intervals for the fitted parameters.

4. Can I improve the accuracy of my curve fitting results in Matlab?

Yes, there are several ways to improve the accuracy of your curve fitting results in Matlab. These include using a more appropriate model, increasing the number of data points, reducing measurement errors, and optimizing the fitting parameters.

5. Are there any limitations to using uncertainty analysis in curve fitting with Matlab?

While uncertainty analysis can provide valuable insights into the reliability of your curve fitting results, there are some limitations to be aware of. These include the assumption of normally distributed errors and the sensitivity of the results to the chosen confidence level and model assumptions.

Similar threads

Replies
6
Views
4K
Replies
12
Views
3K
Replies
9
Views
4K
Replies
1
Views
2K
Replies
1
Views
9K
Replies
1
Views
4K
Replies
5
Views
2K
Replies
2
Views
8K
Back
Top