How do I fit errorbars with standard deviation on a fitted curve using cftool?
9 ビュー (過去 30 日間)
古いコメントを表示
Hey,
I am using cftool to fit special exponential curves with custom equation. I'd like to have errorbars (with standard deviation) in this graphic (fitted curve) for the individual measured points. Is is possible to do that using cftool? If not, could you please tell me how to do the fitting and the errorbars without cftool. I really need step by step explanations, because I am an absolutely newcomer in Matlab.
Thanks in advance.
Julia
0 件のコメント
採用された回答
Mads
2014 年 7 月 7 日
Hey J
Here is one suggestion:
1) use cftool as you do to make a fit on your data. Once you are are done, in the cftool window you go to "File", and click "Generate Code"
That should give you a m-file that basically, when run, gives you the same result as when you manually used cftool.
2) Now you use the output from the fit-function which you see in this m-file.
The second output from fit, say it is called gof, is a goodness-of-fit-struct which contains fx. rmse (standard error)
so I think you look for:
gof.rmse
3) Play with the plotting-function errorbar(...)
Takes:
figure errorbar(X,Y,E)
where E is the errorbar value on Y for a given X
so E associates with gof.rmse if I understand correctly if X and Y are the fit data, not the real data.
Hope this helps.
I found it useful to read about "fit" in the documentation.
Best
Mads
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!