%!demo
%! ## Generate random samples from an Exponential distribution
%! pd = makedist ("Exponential", "mu", 2)
%! rand ("seed", 5);
%! samples = random (pd, 500, 1);
%! hist (samples, 50)
%! title ("Histogram of 500 random samples from Exponential(mu=2)")
%! xlabel ("values in x")
%! ylabel ("Frequency")
%!
%! ## This generates random samples from an Exponential distribution, useful
%! ## for simulating waiting times or inter-arrival times.
