matlab绘图

[复制链接]
查看11 | 回复3 | 2011-9-25 14:14:42 | 显示全部楼层 |阅读模式
n=30;sum=zeros(1,n^5);i=1;for a=1:n
for b=1:n
for c=1:n
for d=1:n
for e=1:n
sum(i)=a+b+c+d+e;
i=i+1;
end
end
end
endendinterval=[2.5:5:152.5];hist(sum,interval)[n,xout] = hist(sum,interval);和值的个数存在n里面...
回复

使用道具 举报

千问 | 2011-9-25 14:14:42 | 显示全部楼层
x=0:1:50; hyx = hygepdf(x,100,20,10);%超几何分布 bx=binopdf(x,200,0.02);%二项式分布 plot(x,bx,'r-',x,hyx,'b-')...
回复

使用道具 举报

千问 | 2011-9-25 14:14:42 | 显示全部楼层

回复

使用道具 举报

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

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行