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!