How to set a startpoint for Gaussian fitting?

Hi all, Is here any body can help me with the start point of Gaussian fitting?
Here is Gaussian equation.
y = a* exp(-((x-b)/c)^2)
for start fitting I need to set up the startpoints as follow:
a0 is the max value of the frequency in a histogram. b0 is the bin value corresponding to the a0 in histogram.
my question is how to set c0 for the starting point?
Thanks a lot in advance.
Zhongkui

 Accepted Answer

Since these are starting point they could be anything. But it helps to be close.
Since c corresponds to the standard deviation of your data, you can give that as c0 to start with. Also you could make sure that c is constrained to be position.
>> c0 = std(data)

2 Comments

Thanks Shashank. It helps.
please accept the answer if it helps you

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!