dcolon - Distributed colon operation

Syntax

dcolon(a,d,b)
dcolon(a,b)

Description

dcolon is the basis for parallel for-loops and the default distribution of distributed arrays.

dcolon(a,d,b) partitions the vector a:d:b into numlabs contiguous subvectors of equal, or nearly equal length, and creates a distributed array whose local portion on each lab is the labindex-th subvector.

dcolon(a,b) uses d = 1.

Examples

Partition the vector 1:10 into four subvectors among four labs.

P>> C=dcolon(1,10)
  1: 1: local(C) = 
  1:      1     2     3
  2: 2: local(C) = 
  2:      4     5     6
  3: 3: local(C) = 
  3:      7     8
  4: 4: local(C) = 
  4:      9    10

See Also

colon MATLAB® function reference page

distributor, defaultPartition, for, distributionPartition

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS