I am a newcomer about MATLAB. Now want to do the same thing like you. Could you give me some help?
Thanks a lot.
"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!