Products & Services Solutions Academia Support User Community Company

Learn more about Parallel Computing Toolbox   

distributed.randn - Create distributed array of normally distributed random values

Syntax

RN = distributed.randn(n)
RN = distributed.randn(m, n, ...)
RN = distributed.randn([m, n, ...])
RN = distributed.randn(..., classname)

Description

RN = distributed.randn(n) creates an n-by-n distributed array of normally distributed random values with underlying class double.

RN = distributed.randn(m, n, ...) and RN = distributed.randn([m, n, ...]) create an m-by-n-by-... distributed array of normally distributed random values.

RN = distributed.randn(..., classname) specifies the class of the distributed array D. Valid choices are the same as for the regular randn function: 'double' (the default), 'single', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', and 'uint64'.

Remarks

When you use randn on the workers in the MATLAB pool, or in a distributed or parallel job (including pmode), each worker or lab sets its random generator seed to a value that depends only on the lab index or task ID. Therefore, the array on each lab is unique for that job. However, if you repeat the job, you get the same random data.

Examples

Create a 1000-by-1000 distributed matrix of normally distributed random values of class double:

RN = distributed.randn(1000);

See Also

randn MATLAB function reference page

codistributed.randn, distributed.rand, distributed.speye, distributed.sprand, distributed.sprandn

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS