www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/CreateHistogramBarPlotwithVectorInputExample.m
%% Histogram of Vector % Copyright 2015 The MathWorks, Inc. %% x = [0 2 9 2 5 8 7 3 1 9 4 3 5 8 10 0 1 2 9 5 10]; hist(x) %% % |hist| sorts the values in |x| among 10 equally spaced bins between the % minimum and maximum values in the vector, which are 0 and 10 in this % example.