GRAND

From Jacket Wiki

(Redirected from RAND)
Jump to: navigation, search
Back to Function List, Jacket Basics

Generates uniformly distributed pseudorandom numbers via the Mersenne Twister algorithm.

Usage

Jacket for M Language
    Supported Syntax
    
r = grand(n)
grand(m,n)
grand([m,n])
grand(m,n,p,...)
grand([m,n,p,...])
grand
grand(size(A))
r = grand(..., 'double')
r = grand(..., 'single')
 
% new in v1.7
r = rand(..., class(x))
r = rand(..., gdouble)
r = rand(..., gsingle)
 
grand('state')  % fetch current generator state
grand('state', scalar_seed)  % re-seed generator
    

GFOR Supported

No

GCOMPILE Supported

No

Types Supported

-  GDOUBLE   GSINGLE 

Types Not Supported

-  GLOGICAL   GINT32   GINT8   GUINT32   GUINT8   COMPLEX 

CPU usageJacket only contains GPU computing functions. To run functions on the CPU, try one of the MathWorks products:
http://www.mathworks.com/help/techdoc/ref/rand.html

Notes

For details on GFOR Support for GRAND see GFOR Usage: Random Data Generation.

GRAND emulates the functionality of RAND.

See Also

GRANDN

Views
Personal tools