Skip to Main Content Skip to Search
Product Documentation

labReceive - Receive data from another lab

Syntax

data = labReceive
data = labReceive(source)
data = labReceive('any',tag)
data = labReceive(source,tag)
[data, source, tag] = labReceive

Arguments

source

labindex of a particular lab from which to receive data.

tag

Tag defined by the sending lab's labSend function to identify particular data.

'any'

String to indicate that data can come from any lab.

data

Data sent by the sending lab's labSend function.

Description

data = labReceive receives data from any lab with any tag.

data = labReceive(source) receives data from the specified lab with any tag

data = labReceive('any',tag) receives data from any lab with the specified tag.

data = labReceive(source,tag) receives data from only the specified lab with the specified tag.

[data, source, tag] = labReceive returns the source and tag with the data.

Tips

This function blocks execution in the lab until the corresponding call to labSend occurs in the sending lab.

For a demonstration that uses labSend, labReceive, labBarrier, and labSendReceive, see the demo Profiling Explicit Parallel Communication.

See Also

labBarrier | labindex | labProbe | labSend | labSendReceive

  


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