matlab代码帮忙看看
补充:设有一批产品2000个,其中有30个次品,随机抽取一百个产品,求其中次品数x的概率密度分布,这里有两种抽取方法:1不放回抽样,一次抽取100个;2放回抽样,抽100次。
代码哪里有问题:
clear
x=0:20;
P1=hygepdf(x,2000,30,100);
P2=binopdf(x,100,0.015);
P3=poisspdf(x,1.5);
subplot(3,1,1)
plot(x,P1,'+')
title('hygepdf');
subplot(3,1,2)
plot(x,P2,'*')
title('binopdf');
subplot(3,1,3)
plot(x,P3,'.')
title('poisspdf')