DIPlib Documentation - ©1995-2009 Quantitative Imaging Group, Delft University of Technology.

# UniformRandomVariable

Uniform random variable generator

## SYNOPSIS

`#include "dip_noise.h"`

dip_Error dip_UniformRandomVariable ( random, lowerBound, upperBound, output)

## FUNCTION

Generate an uniform distributed random variable.

## ARGUMENTS

Data type | Name | Description
`dip_Random *` | `random` | Pointer to a random value structure
`dip_float` | `lowerBound` | Lower bound of the uniform distribution the variable is drawn from
`dip_float` | `upperBound` | Upper bound of the uniform distribution the variable is drawn from
`dip_float*` | `output` | output

## EXAMPLE

Get a uniform random variable as follows:

       dip_Random random;
       dip_float lower, upper, value;

       lower = -1.0;
       upper = 1.0;
       DIPXX( dip_UniformRandomVariable( &random, lower, upper,  &value));

## SEE ALSO

`RandomVariable`, `RandomSeed`, `GaussianRandomVariable`, `PoissonRandomVariable`, `BinaryRandomVariable`

DIPlib on-line documentation | Function reference | Global function index