Skip to Main Content Skip to Search
Product Documentation

pctRunOnAll - Run command on client and all workers in matlabpool

Syntax

pctRunOnAll command

Description

pctRunOnAll command runs the specified command on all the workers of the matlabpool as well as the client, and prints any command-line output back to the client Command Window. The specified command runs in the base workspace of the workers and does not have any return variables. This is useful if there are setup changes that need to be performed on all the labs and the client.

Examples

Clear all loaded functions on all labs:

pctRunOnAll clear functions

Change the directory on all workers to the project directory:

pctRunOnAll cd /opt/projects/c1456

Add some directories to the paths of all the labs:

pctRunOnAll addpath({'/usr/share/path1' '/usr/share/path2'})

See Also

matlabpool

  


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