Optimising the fit of a function with 2 variables
古いコメントを表示
Hi,
I'm using a Gaussian derivative function of the form
A*(mu-x)*exp(-((x-mu)^2)/(2*S^2)))/S^2
to fit some existing discrete data and I want to vary A and S to minimse the RMS error of the fit.
Does anyone know of a function that would allow me to do this, and how I should use it?
I'd appreciate any help!
Thanks,
Earle
採用された回答
その他の回答 (1 件)
Frederic Moisy
2012 年 5 月 14 日
0 投票
You can also use the Ezyfit toolbox, which is free: http://www.mathworks.com/matlabcentral/fileexchange/10176
One installed, you can perform your fit like this:
f = ezfit(x,y,'A*(mu-x)*exp(-((x-mu)^2)/(2*S^2)))/S^2');
See also the example here:
カテゴリ
ヘルプ センター および File Exchange で Linear Predictive Coding についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!