Optimising the fit of a function with 2 variables
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Frederic Moisy
el 14 de Mayo de 2012
0 votos
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:
Categorías
Más información sobre Linear Predictive Coding en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!