You are here: Symbol Reference > StatRandom Namespace > Functions > StatRandom.RandomTriangular Function
Stats Master VCL
ContentsIndex
Example

Generate 2000 random numbers by using the triangular distribution witg parameters a=2.2, b=8 and c=5.5.

Uses MtxExpr, StatRandom;
procedure Example;
  var Res: Vector;
begin
  Res.Size(2000);
  RandomTriangular(2.2, 8.0, 5.5, r);
end;
#include "MtxExpr.hpp"
#include "StatRandom.hpp"
void __fastcall Example()
{
  sVector Res;
  Res.Size(2000,false);
  RandomTriangular(2.2, 8.0, 5.5, Res, -1);
}
Copyright (c) 1999-2025 by Dew Research. All rights reserved.