フィルターのクリア

Matlab curve fitting tool automation for selection of fit with minimum sse.

4 ビュー (過去 30 日間)
zafar khan
zafar khan 2017 年 5 月 2 日
コメント済み: zafar khan 2017 年 5 月 9 日
I have time as x data and energy consumption data as y data, i am trying to use curve fitting tool for smoothing the curves of energy data. Is there a way that matlab can automatically check all the fittings techniques and tables of SSE are given out. Certain types of fitting like interpolation, spline interpolation are not to be included in the fitting options as they will obviously give the minimum sse.

採用された回答

Kevin Gleason
Kevin Gleason 2017 年 5 月 5 日
You could certainly write your own function by using the gof output of the "fit" function.
Here is an example that shows you how to use the "fit" to see the Goodness of Fit of different methods. You could store the "gof" values in an array and find the max GoF.
function bestFitName = Gof_Finder( x, y )
Fits = {'poly1', 'poly2', 'poly3', 'exp1'};
for i=1:numel(Fits)
[~,GoFs(i)] = fit( x, y, Fits{i} );
end
[~, minIdx] = min([GoFs.sse]);
bestFitName = Fits{minIdx};
end
The above function will return the name of the best fit of the data x and y.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by