Composite - Create Composite object
Syntax
C = Composite()
C = Composite(nlabs)
Description
C = Composite() creates a Composite object
on the client using labs from the MATLAB pool. The actual number
of labs referenced by this Composite object depends on the size of
the MATLAB pool and any existing Composite objects. Generally,
you should construct Composite objects outside any spmd statement.
C = Composite(nlabs) creates a Composite
object on the parallel resource set that matches the specified constraint. nlabs must
be a vector of length 1 or 2, containing integers or Inf.
If nlabs is of length 1, it specifies the exact
number of labs to use. If nlabs is of size 2, it
specifies the minimum and maximum number of labs to use. The actual
number of labs used is the maximum number of labs compatible with
the size of the MATLAB pool, and with other existing Composite
objects. An error is thrown if the constraints on the number of labs
cannot be met.
A Composite object has one entry for each lab; initially each
entry contains no data. Use either indexing or an spmd block
to define values for the entries.
Examples
Create a Composite object with no defined entries, then assign
its values:
c = Composite(); % One element per lab in the pool
for ii = 1:length(c)
% Set the entry for each lab to zero
c{ii} = 0; % Value stored on each lab
endSee Also
matlabpool, spmd
 | codistributor2dbc.defaultLabGrid | | createJob |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit