MATLAB: How to turn warning off in parpool

parpoolwarnings

I am running a PSO optimization. Some of the particles are near to singular value in the calculation of a matrix. I really dont care about that is a usual warning. I tried the usual method of
warning off MATLAB:singularMatrix;
warning off MATLAB:nearlySingularMatrix
and
[a, MSGID] = lastwarn();
warning('off', MSGID)
but because is in the function i am having warnings for each processor. How can I turn off this warnings. It is slowing the process Note: full warning off also is not working.

Best Answer

Try parfevalOnAll to turn the warnings off on all workers after you open the pool but before you parfor