maxNumCompThreads
Control maximum number of computational threads
Description
returns the current maximum number of computational threads.N
= maxNumCompThreads
Currently, the maximum number of computational threads is equal to the number of physical cores on your machine.
sets the maximum number of computational threads using what the MATLAB® software determines to be the most desirable. It additionally returns the
previous maximum number of computational threads, LASTN
= maxNumCompThreads('automatic')LASTN
.
Note
Setting the maximum number of computational threads using
maxNumCompThreads
does not propagate to your next MATLAB session.
You can set the -singleCompThread
option when starting
MATLAB to limit MATLAB to a single computational thread. By default, MATLAB makes use of the multithreading capabilities of the computer on which it
is running.
On Windows® platforms with multiple processor groups, the default maximum number of computational threads is equal to the number of physical cores within the processor group that is running MATLAB.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2007b