# coyote: CGRANDOMWALD

- coyote/Utilities
- [Source code]

Description

      This function creates a vector of N random numbers using an Inverse Gaussian Distribution,
      which is also known as the Wald Distribution. The reference for the code can be found at
      http://en.wikipedia.org/wiki/Inverse_Gaussian_distribution.

Categories

      Utility

Params

      seed: in, optional
         The seed for the random number generator. If undefined, on output will
         have the seed used by the IDL RandomU function. See the documentation
         for RandomU for additional information.
      dims: in, optional, type=integer
         A scalar or integer array defining the dimensions of the result. If no dimensions
         are specified, a single random number is returned. If `Dims` is a scalar, a 1D vector
         of that number of values will be returned.

Keywords

      mu: in, optional, type=double, default=1.0
         The mean of the distribution.
      lambda: in, optional, type=double, default=1.0
         The shape parameter of the distribution. As lambda tends to infinity, the inverse
         distribution becomes more like a normal distribution.

Examples

      For example, to create 100 random numbers, using the Wald distribution::
         wald = cgRandomWald(seed, 100)
      To create a 20-column by 10-row array of random numbers::
         wald = cgRandoWald(seed, [20,10])

Author

      FANNING SOFTWARE CONSULTING::
         David W. Fanning
         1645 Sheely Drive
         Fort Collins, CO 80526 USA
         Phone: 970-221-0438
         E-mail: david@idlcoyote.com
         Coyote's Guide to IDL Programming: http://www.idlcoyote.com

History

      Written, 25 Oct 2012, by David W. Fanning.

Copyright

      Copyright (c) 2012, Fanning Software Consulting, Inc.