Is there a programmatic way to get the number of logical cores? The feature command shows me this in text, but I want a way to directly access the number. The code below returns the number of physical cores. Is there a similar way to do this for logical cores?
numcores = feature('numcores') numcores = 2feature('numcores')MATLAB detected: 2 physical cores.MATLAB detected: 4 logical cores.MATLAB was assigned: 4 logical cores by the OS.MATLAB is using: 2 logical cores.MATLAB is not using all logical cores because hyper-threading is enabled. ans = 2
Best Answer