The following Matlab project contains the source code and Matlab examples used for gaussian curve fit.
this function is doing fit to the function
y=A * exp( -(x-mu)^2 / (2*sigma^2) )
the fitting is been done by a polyfit
the lan of the data.