| Statistics Toolbox | ![]() |
Syntax
Description
draws a 10-bin histogram for the data in vector hist(y)
y. The bins are equally spaced between the minimum and maximum values in y.
draws a histogram with hist(y,nb)
nb bins.
draws a histogram using the bins in the vector hist(y,x)
x.
do not draw graphs, but return vectors [n,x] = hist(y,...)
n and x containing the frequency counts and the bin locations such that bar(x,n) plots the histogram. This is useful in situations where more control is needed over the appearance of a graph, for example, to combine a histogram into a more elaborate plot statement.
The hist function is a part of the standard MATLAB language.
Examples
Generate bell-curve histograms from Gaussian data.
| harmmean | histfit | ![]() |