It is different with the plot function , we can use axis() to adjust the x-axis ,
but it does not work in histogram.
so , Matlab has provided anothoer method as follow:
x = 0:1:4;
y = randn(10000,1);
hist(y,x)
x = 0:1:4 ;
It means that the range of x-asis is from 0 to 4 , and the distance between each column is 1.
全站熱搜
留言列表