Code using Curve Fitting Toolbox with Customized Function

Is it possible to write an automated code using the Curve Fitting Toolbox to fit data to a customized function? Example
clc
format short e
x = xdata
y = ydata;
f = fit(x,y,'Desired_Function')
plot(f,x,y)
Where desired function is something outside the usual default functions of Matlab. I usually need to make a fitting inside a bigger program and the fitting functions go beyond what Matlab offers in its library.

 採用された回答

Torsten
Torsten 2016 年 3 月 18 日

0 投票

You can supply an arbitrary anonymous function as fittype:
Best wishes
Torsten.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

質問済み:

2016 年 3 月 18 日

コメント済み:

2016 年 3 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by