Products & Services Solutions Academia Support User Community Company

Learn more about Parallel Computing Toolbox   

distributed.ones - Create distributed array of ones

Syntax

D = distributed.ones(n)
D = distributed.ones(m, n, ...)
D = distributed.ones([m, n, ...])
D = distributed.ones(..., classname)

Description

D = distributed.ones(n) creates an n-by-n codistributed matrix of ones of class double.

D = distributed.ones(m, n, ...) or D = distributed.ones([m, n, ...]) creates an m-by-n-by-... distributed array of ones.

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

Examples

Create a 1000-by-1000 distributed matrix of ones of class double:

D = distributed.ones(1000);

See Also

ones MATLAB function reference page

codistributed.ones, distributed.eye, distributed.zeros

  


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