Triangular Distribution Tranformation - trirnd

trirnd computes a set of triangularly distributed random variables given input numbers in [0,1].
196 Downloads
Updated 18 Aug 2011

View License

Computes triangular rvs from an set of input random numbers given min, max and mode values using the inversion method.

This function can handle single value, vector and matrix input.

Try the following examples to experiment with functionality.
e.g. 1
trimax = 700;
trimin = 300;
trimode = 500;
rvs = rand(1000,1);

e.g. 2
trimin = repmat(0.5,3,3);
trimax = rempat(1.5,3,3);
trimode = repmat(1,3,3);
rvs = magic(3)./10;

Cite As

Marc Stettler (2024). Triangular Distribution Tranformation - trirnd (https://www.mathworks.com/matlabcentral/fileexchange/32567-triangular-distribution-tranformation-trirnd), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0