%!demo
%! ## Generate random samples from a Triangular distribution
%! rand ("seed", 21);
%! samples = trirnd (0, 1, 2, 500, 1);
%! hist (samples, 50)
%! title ("Histogram of 500 random samples from Triangular(A=0, B=1, C=2)")
%! xlabel ("Values in x (A <= x <= C)")
%! ylabel ("Frequency")
%!
%! ## This generates random samples from a Triangular distribution, useful for
%! ## simulating bounded data like project costs or completion times.
