0

I have a data set that has two peaks close together. I'd like to fit these peaks with gaussians so that I come up with a new data set that replicates the original one. To this end, I am using MATLAB's "findpeaks" function, and using the heights and widths of the peaks in order to come up with the appropriate number of gaussians, and then add those gaussians together. However, because the peaks are so close together, the result looks like the following (with the original data set in blue and the replicated one in red):

enter image description here

Is there a better method to replicate the data with gaussian peaks?

naomig
  • 271
  • 1
  • 7
  • 12

1 Answers1

0

Gaussian function are defined by two variable, mean and variance. The two peak would give you the means of the two gaussians and by the look of the figure the same variance for them both (If some data has gone through a Gaussian process the variance would be the same, I can not think of a physical process where that would not be the case, unless it is just an arbitrary plot). So you only have to find one variable. As for the peaks that would just be the normalization so that the area under the curve sums up to 1. A gaussian sums up to 1 by default, if the sum under the plot you are trying to fit is 2 you do not need to do anything, otherwise scale accordingly.

My guess is something like this (pseudo code):

f = 0.5*gauss(-3,var)+0.5*gauss(3,var)

If you know more about the process that created the plot, then you can actually do better.

mpaskov
  • 1,234
  • 2
  • 11
  • 21