rand(1)

NAME
rand - random number generator

CALLING SEQUENCE
rand(m,n)
rand(x)
rand('key'[,n])

DESCRIPTION
random matrix generator.

rand(m,n)
    is a random matrix of dimension mxn.

rand(a)
    is a random matrix of same size as a.

rand('uniform')
    is for uniform random numbers.

rand('normal')
    is for gaussian random numbers.

rand('seed')
    returns the current value of the seed.

rand('seed',n)
    puts the seed to n. (n=0 at first call).

rand : with no arguments gives a scalar whose value changes each time it is referenced. By default, random numbers are uniformly distributed in the interval (0,1). rand('normal') switches to a normal distribution with mean 0 and variance 1. rand('uniform') switches back to the uniform distribution.

SEE ALSO
ssrand