function ShowGeometric(p,n) %function ShowGeometric(p,n) % % p: probbaility of success % n: cutoff for i=1:n P(i)= (1-p)^(i-1) * p; end figure(1); bar(P); drawnow;