Dew Stats Master .NET
RandomLogNormal Routine
Summary
Lognormal distribution random generator.

Unit
StatRandom

Declaration
Procedure RandomLogNormal(mu, sigma: TSample; Results: TDenseMtxVec; Seed: Integer = -1);

Description
This routine generates Result.Length pseudo random numbers, using the lognormal distribution with parameters mu and sigma. The random numbers are stored in the Results vector. An exception is raised if Result vector is complex.
Categories
Random number generators

Example 1

Generate 2000 random numbers by using the lognormal distribution with parameters Mu=3.0 and Sigma=2.4.

Uses MtxExpr, StatRandom; procedure Example; var Res: Vector; begin Res.Size(2000); RandomLogNormal(3.0, 2.4, Res); end;
#include "MtxVecCpp.h" #include "StatRandom.hpp" void __fastcall Example() { Vector Res; Res->Size(2000,false); RandomLogNormal(3.0, 2.4, Res, -1); }
using Dew.Math; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { Vector r = new Vector(2000,false); StatRandom.RandomLogNormal(3.0, 2.4, r, -1); } }


Copyright 2008 Dew Research
http://www.dewresearch.com