User`s guide
Run Communicating Jobs Interactively Using pmode
4-7
P>> combined = gather(whole)
Notice, however, that this gathers the entire array into the workspaces of all the
workers. See the gather reference page for the syntax to gather the array into the
workspace of only one worker.
12
Because the workers ordinarily do not have displays, if you want to perform any
graphical tasks involving your data, such as plotting, you must do this from the
client workspace. Copy the array to the client workspace by typing the following
commands in the MATLAB (client) Command Window.
pmode lab2client combined 1
Notice that combined is now a 3-by-8 array in the client workspace.
whos combined
To see the array, type its name.
combined
13
Many matrix functions that might be familiar can operate on codistributed arrays.
For example, the eye function creates an identity matrix. Now you can create a
codistributed identity matrix with the following commands in the Parallel Command
Window.
P>> distobj = codistributor1d();
P>> I = eye(6, distobj)
P>> getLocalPart(I)
Calling the codistributor1d function without arguments specifies the default
distribution, which is by columns in this case, distributed as evenly as possible.