To create a normalized histogram in Matlab, you can use the histogram
function with the 'Normalization'
parameter set to 'probability'
.
Here's an example:
main.m149 chars6 lines
This will create a histogram with 20 bins, where the y-axis represents the probability density. Note that the sum of the areas of all bars will be equal to 1, which represents the total probability of the data set.
gistlibby LogSnag