Skip to content

Category: Helper Functions

random number generator triangular


Returns random value according to triangular distribution. A new random value is returned every time the worksheet is calculated.


syRandomTriangular(MinValue, MidValue, MaxValue)

The syRandomTriangular function syntax has the following arguments:

  • MinValue: required. Lower limit.
  • MidValue: required. Mode (i.e. value with highest probability).
  • MaxValue: required. Upper limit.

Return value is value generated according to the triangular distribution and given arguments.


The function is handy especially if we have no reliable data about the phenomena, and are assuming some mean value with the highest probability and minimum and maximum value.


  • syRandomTriangular(1, 5, 7) - The function will draw real numbers in the range from 1 to 7.