Skip to Main Content Skip to Search
Product Documentation

distributed - Create distributed array from data in client workspace

Syntax

D = distributed(X)

Description

D = distributed(X) creates a distributed array from X. X is an array stored on the MATLAB client, and D is a distributed array stored in parts on the workers of the open MATLAB pool.

Constructing a distributed array from local data this way is appropriate only if the MATLAB client can store the entirety of X in its memory. To construct large distributed arrays, use one of the static constructor methods such as distributed.ones, distributed.zeros, etc.

If the input argument is already a distributed array, the result is the same as the input.

Examples

Create a small array and distribute it:

Nsmall = 50;
D1 = distributed(magic(Nsmall));

Create a large distributed array using a static build method:

Nlarge = 1000;
D2 = distributed.rand(Nlarge);
  


Free Parallel Computing Interactive Kit

See how to solve large problems with minimal effort and reduce simulation time.

Get free kit

Trials Available

Try the latest versions of parallel computing products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS