Main Content

Composite

Access nondistributed variables on multiple workers from client

Constructor

Composite

Description

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

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

spmdstatements create Composites automatically, which you can access after the statement completes. You can also create a Composite explicitly with theCompositefunction.

Methods

exist Check whether Composite is defined on workers
subsasgn Subscripted assignment for Composite
subsref Subscripted reference for Composite

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

disp 显示复合
end Indicate last Composite index
isempty Determine whether Composite is empty
length Length of Composite
ndims Number of Composite dimensions
numel Number of elements in Composite
size Composite dimensions

Version History

Introduced in R2008b