How does matlab's gaussian fit function select peak centers
4 次查看(过去 30 天)
显示 更早的评论
I have a series of data traces that represent change in two gaussian peaks over time. Each trace varies a little from the others due to noise but at least visually the two peaks are clearly visible at every time step. When I perform a "gauss2" fitting on the data occasionally it manages to successfully identify the two peaks and fit them well. Most time steps it seems to select the second peak far too close to the first peak and so instead of two clearly separated peaks it gives me a single big peak with a long tail. I think the problem is that it's failing to select the second peak center properly, so I was wondering how the "fit" program does that and how this might be resolved.
Thanks all
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164685/image.jpeg)
0 个评论
回答(2 个)
Kushagr Gupta
2017-6-8
Looking at the graphs, it seems that the kernel size being used is too large. In such a case, large amount of neighborhood data is being used to come up with the fit.
You would have to modify some of the parameters to get the desired result. As "gauss2" uses NonLinear LeastSquares method, I feel changing (reducing) the value of "DiffMaxChange" should give a better result. Lowering the "Span" field value can also help in getting the second peak but it depends on what fit type is being used.
I would recommend playing around with the different algorithms available and tweaking their settings to get a desired result.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!