matlab 在柱状图上 显示数字
2015-06-07 22:19 zhaoyang10 阅读(10695) 评论(0) 编辑 收藏 举报x = rand(100,1);
[n,y] = hist(x);
bar(y,n);
for i = 1:length(y)
text(y(i),n(i)+0.5,num2str(n(i)));
end
还记得有一个人在前面
x = rand(100,1);
[n,y] = hist(x);
bar(y,n);
for i = 1:length(y)
text(y(i),n(i)+0.5,num2str(n(i)));
end