Is it possible to distribute an array of user defined objects in MATLAB 7.6 (R2008a)?

I am trying to use parallel computing toolbox with objects. I was wondering if I could create a distributed array of objects while working in pmode.

 Accepted Answer

The ability to create distributed arrays of user defined objects is not available in MATLAB.
To work around this issue, please create a cell array of the objects and distribute that among the labs. For example consider the following code.
Start PMODE with two labs
pmode start 2
Type the following at the PMODE prompt to create two instances of myObect
d=cell(1,2,distributor);
d(1)={myObj};
d(2)={myObj};
r=localPart(d);
r{1}.a %accessing a property 'a' after unwrapping the object

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Products

Release

R2008a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!