MATLAB: How to fit multiple curves to one curve

curve fitting

Hello Everyone,
Actually, I have a curve which is a result of an experiment ( the black curve in below picture). I need to find some gaussian ( or other function) to fit to this diagram in the following way (The red curves). The idea, is that the main curve has some bumbs and I need to fit some ideal curves to the main curve. Do you have any idea that how I can do it?
IMG_20191001_094104_599 (1).jpg

Best Answer

See: Area under each peak for an example of how to detect the Gaussians (and, if you want to, find thier areas).