How to programmatically determine if in headless mode..?
26 views (last 30 days)
I'm working on an issue with the Parallel Computing Toolbox (PCT)..
As each MATLAB.exe worker thread process is initialized, startup.m is executed. All worker threads are "headless" (no output window). Certain graphics-related function calls that are fine-- when launched within the full MATLAB app with its output capability-- can cause problems in the headless context.
I have a graphics-related function that's very convenient to have in the full MATLAB app's startup.m, but mustn't execute in the PCT worker thread context. Is there a function call I can insert into startup.m to determine if its MATLAB.exe process is running in headless mode? I would like to use as follows:
% Is there an output window associated with this MATLAB.exe process?
% YES : render graphics window
Any help appreciated, Thanks, Brad