How is possible to calculate error for a fitted graph?

조회 수: 1 (최근 30일)
Moj
Moj 2020년 2월 28일
댓글: dpb 2020년 2월 28일
Could you please guide me is there any command to calculate error for a fitted scattered data?
  댓글 수: 4
Moj
Moj 2020년 2월 28일
x = [72.01 59.9903 51.1286 45.532 36.1536 31.6631 30.16 29.0116 25.62 23.468];
sintheta = [-0.817 -0.6765 -0.8314 -0.7347 -0.6674 -0.436 0.4537 0.758 0.967 0.9972];
mdl = fittype('-1+2*sqrt(alpha./x).*exp(-beta*(x-alpha).^2)','indep','x');
fittedmdl = fit(x',sintheta',mdl,'startpoint',[23,0.06])
plot(fittedmdl)
hold on
plot(x,sintheta,'o')
dpb
dpb 2020년 2월 28일
See the links to postprocessing fit results...it is, unfortunately, the weak link in MATLAB curve fitting.
The Curve Fitting Tool, cftool has the goodness of fit table shown if you build the model inside it which you can then export. There are a few supplied functions that take the fit object created above and return some statistics that are linked to from the postprocessing link or through the cfit object link of the output variable from fit, but none of those functions will build a nice ANOVA table or the like for you similar to SAS or other stat packages, unfortunately.
Otherwise, you're forced to build those additional results from basic principles. The PostProcessing link shows how to do some of the most basic.
As noted, big weakness in MATLAB Statistics and Fitting toolboxes in general. Pretty easy to compute the answers, not so easy for most to analyze/use the results as all you get for the most part is the most basic info.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by