MATLAB: How to group ”higher than a certain value”-data into one single bin in an histogram

histogram bin bins limitMATLAB

I have a big set of data and I'm creating an histogram.
The problem is that I have a few values that are way bigger than the vast majority of the other values:
When zooming in:
As you can see some very big values appear with a very low frequency, it might seem (statistically) strange, but I don't want to remove those values from my data set (as outliers).
Instead what I would like to have is a single bin containing all observations higher than a certain value (for example 1e-4 in this case), reflecting of course the correct frequency.
Thank you !

Best Answer

Specify 'BinEdges' in histogram():
data = 2e-4 * rand(1000);
subplot(2, 1, 1);
histObject = histogram(data);
subplot(2, 1, 2);
histObject = histogram(data, 'BinEdges', [0, .25, .5, .75, 1, inf] * 1e-4);