No BSD License  

Highlights from
PMF for Poisson

from PMF for Poisson by Zeeshan Shareef
This file calculates the PMF of the Poisson's Distribution.

Poisson.m
% This function calculates the Poisson's PMF.

clc;
clear;
count=zeros(100,1);
p=zeros(100,1);			% Value of M

for k=1:100
    for m=1:100000
        x=0;
        for n=1:100
            if rand<=0.05	% Value of p		
                x=x+1;
            end
        end
        if x==k
            count(k)=count(k)+1;
        end
    end
end

for k=1:100			% Calculating the PMF
    p(k)=count(k)/100000;
end

Contact us at files@mathworks.com