function GeometricDistribution(p,sims)
% geometric distribution with parameter p up to N and sims simulations



Trials = geornd(p,1, sims)+1;

n = max(Trials);


for i = 1:n+1
    Dist(i) = (numel(find(Trials==i)))/sims;
end

RR = max(Dist);

plot(1:n+1, Dist, 's', 'MarkerSize', 8)
axis([0 n+1 0 RR+.05])