maxNumCompThreads Replacement

Returns the number of available CPU cores

You are now following this Submission

maxNumCompThreads returns the number of available CPU cores, works with Windows, Linux, OpenBSD and MAC-OS, using a c-coded mex-file.

N = maxNumCompThreads()

Replacement of the original "Matlab maxNumCompThreads" which will be removed in a future release.

Cite As

Dirk-Jan Kroon (2026). maxNumCompThreads Replacement (https://www.mathworks.com/matlabcentral/fileexchange/27856-maxnumcompthreads-replacement), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0.0

Replaced "wrapping" code by more elegant version of James Tursa

1.0.0.0