%!demo
%! ## Generate random samples from a Poisson distribution
%! rand ("seed", 21);
%! samples = poissrnd (5, 500, 1);
%! hist (samples, 20)
%! title ("Histogram of 500 random samples from Poisson(lambda=5)")
%! xlabel ("values in x (non-negative integers)")
%! ylabel ("Frequency")
%!
%! ## This generates random count samples from a Poisson distribution, useful
%! ## for simulating event occurrences like defect counts or traffic arrivals.
