Add Distribution Fitting & Simulation Features to Your Applications |
|||||||||
SPA SDK Help Home • Learn More About the SPA SDK | |||||||||
SPADistribution.RandomArray (method)DescriptionGenerates 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
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 |