Skip to Main Content Skip to Search
Product Documentation

gplus - Global addition

Syntax

S = gplus(X)
S = gplus(X, targetlab)

Description

S = gplus(X) returns the addition of the variant array X from each lab. The result S is replicated on all labs.

S = gplus(X, targetlab) performs the addition, and places the result into S only on the lab indicated by targetlab. S is set to [] on all other labs.

Examples

With four labs,

S = gplus(labindex)

returns S = 1 + 2 + 3 + 4 = 10 on all four labs.

See Also

gop | labindex

  


Free Parallel Computing Interactive Kit

See how to solve large problems with minimal effort and reduce simulation time.

Get free kit

Trials Available

Try the latest versions of parallel computing products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS