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.
文章標籤
全站熱搜
創作者介紹
創作者 JerryCheng 的頭像
JerryCheng

KwCheng's blog

JerryCheng 發表在 痞客邦 留言(0) 人氣(407)