User`s guide

parpool
11-237
Return Pool Object and Delete Pool
Create a parallel pool with the default profile, and later delete the pool.
poolobj = parpool;
delete(poolobj)
Determine Size of Current Pool
Find the number of workers in the current parallel pool.
poolobj = gcp('nocreate'); % If no pool, do not create new one.
if isempty(poolobj)
poolsize = 0;
else
poolsize = poolobj.NumWorkers
end
Input Arguments
poolsize — Size of parallel pool
set in parallel preferences or parallel profile (default)
Size of the parallel pool, specified as a numeric value.
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 |
uint32 | uint64
profilename — Profile that defines cluster and properties
string
Profile that defines cluster and properties, specified as a string.
Example:
Data Types: char
cluster — Cluster to start pool on
cluster object
Cluster to start pool on, specified as a cluster object