gcat
(Not recommended) Concatenate arrays on spmd workers
gcat is not recommended. Use spmdCat instead.
For more information, see Version History.
Description
horizontally
concatenates the array B = gcat(A)A defined on each worker running an
spmd block or communicating job.
When you use parfor, parfeval, or
parfevalOnAll to run code on a parallel
pool, the workers are independent and do not communicate with each other. If you use
gcat on these workers, the result is the same as using
gcat on a client.
You can use gcat only if the array A
defined on each worker can be concatenated along the second dimension.
gcat concatenates the arrays along the second dimension,
then stores the result on all workers. The value of A is taken from
each worker and concatenated in labindex order. For example,
gcat(labindex) returns 1:numlabs.
If numlabs is equal to 1,
B is equal to A.
concatenates the array B = gcat(A,dim,destination)A defined on each worker and stores the result
on only one worker.
Examples
Input Arguments
Output Arguments
Algorithms
When you use gcat(A), the value of A on each
worker is concatenated with the value on other workers.
