Fitting exponential function, coefficients and errors

7 ビュー (過去 30 日間)
Omnis
Omnis 2013 年 11 月 2 日
回答済み: Jonathan LeSage 2013 年 11 月 6 日
Dear experts,
I have experimental data for exponential distribution a*exp(b*x). I need to find coefficients a, b and their errors. I have used function fit(B,C, 'exp1') and I got some results. I have problem because some data points in my file have higher error rate because of the nature of experiment.
1.) Which algorithm or function in Matlab can give the smallest error ? 2.) How can I use/adopt some function in Matlab to put smaller weight (when I calculate coefficients) on data that drastically differ from exponential function ?
Thank you.

採用された回答

Jonathan LeSage
Jonathan LeSage 2013 年 11 月 6 日
You have quite a few options that you might want to check out to improve your exponential fit! As an option within the fit function, you can exclude outlier data points from the your exponential fit. For example, here is how you would find an exponential fit with the 25th and 30th data points removed (assuming these are outlier points):
[expFit,goodness] = fit(xdata,ydata,'exp1','Exclude', [25 30]);
You can also provide a vector of weights to augment your exponential fit. In the following example, the weight vector is used in the fit:
[expFit,goodness] = fit(xdata,ydata,'exp1','Weights',weightVec);
As you mentioned, you could decrease the influence of outliers by weighting them accordingly. Another recommendation would be to explore the curve fitting tool that allows you to graphically fit your data. Use cftool to open the user interface.
Here are some links to additional documentation to help get you started:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by