NuMFor 9f2ab49 (2024-04-08)
Numerical (Modern) Fortran. Library for Simple Numerical computing
random_uniform Interface Reference

Fills a scalar or array with random numbers in the half-open interval [low, high). More...

Detailed Description

Fills a scalar or array with random numbers in the half-open interval [low, high).

The signature is call random_uniform(low, high, x) where x may be a scalar, vector (1D array), matrix (2D array), 3D-array, 4D-array, or 5D-array.

Example:

call random_uniform(-5._dp, 5._dp, r1)
print "(A)", str(r1)
! Outputs:
! [[ -2.4868218207196, -4.7728756137207]
! [ 0.2064315257349, -1.5532969392081]
! [ -2.2580439639714, 0.6103210017639]]

The documentation for this interface was generated from the following file: