Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

QUESTION NO 1

MATLAB Code
randtool
%import random generated number from randtool
x=0:1:10
y=0:01:12
hold on
histogram(poissrv10,x,'Normalization','pdf')
t=poisspdf(4,y)
plot(t,'LineWidth', 2)
title('N=10')
xlim([0 12])
ylim([0 0.35])
hold off
figure()
hold on
histogram(poissrv50,x,'Normalization','pdf')
t=poisspdf(4,y)
plot(t,'LineWidth', 2)
title('N=50')
xlim([0 12])
ylim([0 0.35])
hold off
figure()
hold on
histogram(poissrv100,x,'Normalization','pdf')
t=poisspdf(4,y)
plot(t,'LineWidth', 2)
title('N=100')
xlim([0 12])
ylim([0 0.35])
hold off

You might also like