Alright, I figured it out. Here is my solution. First, I changed the custom equation to this: A*exp(-(x-x0)^2/(2*sigmax^2)-(y-y0)^2/(2*sigmay^2)) It was also necessary to change the 'Fit Options'. I changed the StartPoint of all the Unknows to 10.
Now it works great. I hope this helps someone out there who is trying to fit 2D gaussians to their data using the Surface Fitting Tool.
"Tim Balmer" <firstname.lastname@example.org> wrote in message <email@example.com>... > I'm trying to fit a 2D gaussian to a surface using the Surface Fitting Tool. I choose the custom equation option and enter this formula: A*exp(-x^2/(2*sigmax^2)-y^2/(2*sigmay^2)) > > I think that either my equation is wrong or I am not using the Surface Fitting Tool properly because it generates a flat surface that doesn't fit at all and has a negative R-square value. > > Any help would be greatly appreciated! > > Thanks!