This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Access nondistributed variables on multiple workers from client




Variables that exist on the workers running an spmd statement are accessible on the client as a Composite object. A Composite resembles a cell array with one element for each worker. So for Composite C:

C{1} represents value of C on worker1
C{2} represents value of C on worker2

spmd statements create Composites automatically, which you can access after the statement completes. You can also create a Composite explicitly with the Composite function.


existCheck whether Composite is defined on workers
subsasgnSubscripted assignment for Composite
subsrefSubscripted reference for Composite

Other methods of a Composite object behave similarly to these MATLAB® array functions:

disp, displayDisplay Composite
endIndicate last Composite index
isemptyDetermine whether Composite is empty
lengthLength of Composite
ndimsNumber of Composite dimensions
numelNumber of elements in Composite
sizeComposite dimensions

Introduced in R2008b

Was this topic helpful?