matlab bar问题

[复制链接]
查看11 | 回复1 | 2010-10-11 18:55:31 | 显示全部楼层 |阅读模式
m=20;l=3;mu=3.5;sigma=0.3; mu1=3.5;sigma1=0.9;
a=0; b=max([mu+4*sigma,mu1+4*sigma1]);
%设定坐标的范围。
subplot(3,2,3),
fenduan=(1:0.1:10), jishu=zeros(1,100); %频率统计
mm=moviein(m);
for k=1:m

rand('seed',1), x=normrnd(mu,sigma);

plot([0,x],[k,k],'linewidth',1), hold on,axis([0 mu+4*0.6 -2 m+5])

plot([x,x],[-5,k],'g-','linewidth',1)

jishu(find(fenduan>x):find(fenduan>x))=1+jishu(find(fenduan>x):find(fenduan>x));

bar([1:100],jishu) %画频率

mm(k)=getframe;
end
不知道为什么运行时不对去掉bar还是对的 加上bar 就错了求解 谢谢啊

回复

使用道具 举报

千问 | 2010-10-11 18:55:31 | 显示全部楼层
你的代码在我这里可以出图出结果,不知道你说哪里错了?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行