[compThreads,count]=sscanf(getenv('NSLOTS'),'%d'); if count == 1 warning('off','MATLAB:maxNumCompThreads:Deprecated'); autoCompThreads = maxNumCompThreads(compThreads); disp(sprintf('NumCompThreads=%d, was %d',compThreads,autoCompThreads)) end