Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: 2D gaussian fitting using Surface Fitting Tool
Replies: 11   Last Post: Dec 8, 2016 8:27 AM

 Search Thread: Advanced Search

 Messages: [ Previous | Next ]
 Tim Balmer Posts: 3 Registered: 6/8/10
Re: 2D gaussian fitting using Surface Fitting Tool
Posted: Jun 8, 2010 8:18 PM
 Plain Text Reply

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" <tbalmer2@student.gsu.edu> wrote in message <hukkmu\$pcd\$1@fred.mathworks.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!

Date Subject Author
6/8/10 Tim Balmer
6/8/10 Tim Balmer
6/14/10 Shu-huai ZHANG
6/15/10 Tim Balmer
6/16/10 Shu-huai ZHANG
8/9/10 pasino pasin
4/3/12 Mat
12/8/16 PARTHA PRATIM DEKA
3/12/12 Zoltan
10/14/13 Maja
10/22/13 cpraj
1/20/14 jamin2

© The Math Forum at NCTM 1994-2018. All Rights Reserved.