1
$\begingroup$

Supose I have a list of 600 samples of numbers, and the histogram of the samples looks like the following:

enter image description here

As can be seen, there are two 'mountains' of values around 16 and 48, and a outlier in 95. I would like to implement an algorithm for retrieving this values: 16 and 48.

Any help will be appreciated,

$\endgroup$
1
$\begingroup$

If you know that there are only two peaks, you can try to fit the data with a sum of two Gaussians: $$f(x) = A_1 \exp(-w_1 (x-x_1)^2) + A_2 \exp(-w_2 (x-x_2)^2)$$ Matlab has a curve fitting toolbox that should be able to solve this.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.