# Detect Matlab function run in parallel worker

Matlab functions can detect if they are being executed in a parallel worker via the Matlab Parallel Computing Toolbox. This can be useful to workaround parallel plotting bugs or for whatever reason distinct parallel logic might be desired in a function.