I have a data set that I use to plot a histogram with the following code:
edges = linspace(0, 1, 21);
figure(1); h = histogram(dataSet,'BinEdges', edges, 'Normalization', 'probability');
title(['Eccentricity Distribution']); xlabel('Eccentricity'); ylabel('Probability'); ylim([0 1]);
I then find the median of the data set using:
I now want to find the probability of this median value from the histogram. At the very least I would need the edges of the bin in which the median value is.
I tried using h.Values and h.Data but these two sets don't share a common indexing method that would allow me to find the index of the median value from h.Values and then use that to find the probability in h.Data.