Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

maxNumCompThreads

Control maximum number of computational threads

Syntax

N = maxNumCompThreads
LASTN = maxNumCompThreads(N)
LASTN = maxNumCompThreads('automatic')

Description

N = maxNumCompThreads returns the current maximum number of computational threads N.

LASTN = maxNumCompThreads(N) sets the maximum number of computational threads to N, and returns the previous maximum number of computational threads, LASTN.

LASTN = maxNumCompThreads('automatic') 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.

Currently, the maximum number of computational threads is equal to the number of computational cores on your machine.

    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.

Introduced in R2007b

Was this topic helpful?