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

SPA SDK Help HomeLearn More About the SPA SDK

SPADistribution.Random (method)

Description

Generates and returns a single random number. Use the SPADistribution.RandomArray method to generate many random numbers at once.

Syntax

object.Random

Return Value

(Double) - a random number.

Example

Sub Test()
  Dim dist As New SPADistribution
  SPAApplication.Initialize

  ' specify the distribution type and parameters
  dist.Type = SPADistWeibull  ' Weibull distribution
  dist.Param(0) = 1.5         ' alpha
  dist.Param(1) = 2           ' beta

  ' generate and show a random number
  MsgBox dist.Random
End Sub
  

See also:

Copyright © MathWave Technologies
www.mathwave.com