Simulation & Probabilistic Analysis SDK
Add Distribution Fitting & Simulation Features to Your Applications

SPA SDK Help HomeLearn More About the SPA SDK

SPADistribution.RandomArray (method)

Description

Generates and returns an array of random numbers. Use the SPADistribution.Random method to generate a single random number.

Syntax

object.RandomArray(count As Long, randomData() As Double)

Arguments

Name
Type
Description
count Long The number of random values to generate.
randomData Double() Input data arrays.

Example

Sub Test()
  Dim data() As Double
  Dim dist As New SPADistribution

  SPAApplication.Initialize

  ' initialize random number generator using the current system time
  SPAApplication.Randomize

  ' specify the distribution type and parameters
  dist.Type = SPADistGamma  ' Gamma distribution 
  dist.Param(0) = 3         ' alpha
  dist.Param(1) = 1.5       ' beta

  ' perform simulation 
  Call dist.RandomArray(250, data)
End Sub
  

See also:

Copyright © MathWave Technologies
www.mathwave.com