gcat

Global concatenation

Syntax

Xs = gcat(X)
Xs = gcat(X,dim)
Xs = gcat(X,dim,targetlab)

Description

Xs = gcat(X) concatenates the variant array X from each worker in the second dimension. The result is replicated on all workers.

Xs = gcat(X,dim) concatenates the variant array X from each worker in the dimension indicated by dim.

Xs = gcat(X,dim,targetlab) performs the reduction, and places the result into res only on the worker indicated by targetlab. res is set to [] on all other workers.

Examples

With four workers,

Xs = gcat(labindex)

returns Xs = [1 2 3 4] on all four workers.

See Also

| | |

Was this topic helpful?