Mathematical Functions: Random Functions

## urd

**urd**(*x*) (no rate restriction)

### Description

Where the argument in parentheses is a function table number. **urd** generates random values according to a discrete random distribution contained in function table *x*. The user creates the discrete distribution histogram table by using **GEN41**. To create the table, the user must define an arbitrary amount of number pairs. The first number of each pair represents a value and the second represents its probability. See **GEN41** for more details.

**urd** can also be used to generate values following a set of ranges of probabilities by using distribution functions generated by **GEN42**. In order to simulate continuous ranges, the table designated by *x* should be reasonably large, since **urd** does not interpolate between table elements.

**urd** is the same as **duserrnd**, but as a function, **urd** may be used in any other expression. See **duserrnd** for more information.

### Author

Gabriel Maldonado

Italy

2001

New in Csound 4.16

Mathematical Functions: Random Functions