%!demo
%! ## Generate random samples from a Rayleigh distribution
%! rand ("seed", 21);
%! samples = raylrnd (1, 500, 1);
%! hist (samples, 50)
%! title ("Histogram of 500 random samples from Rayleigh(sigma=1)")
%! xlabel ("values in x (x >= 0)")
%! ylabel ("Frequency")
%!
%! ## This generates random samples from a Rayleigh distribution, useful
%! ## for simulating nonnegative data like envelope of narrowband signals.
