MATLAB: Is it possible to suppress the MATLAB Command Window from opening when you launch the MATLAB Engine using MATLAB 7.8 (R2009a)

comengineheadlessinvisibleMATLAB

I am using the MATLAB Engine library to call MATLAB from my C code. When I call the ENGOPEN function to start a MATLAB Engine session, the MATLAB Command Window opens up when the MATLAB COM Server is created. As I am using MATLAB only for computation, I do not require the Command Window. It would be very useful to have the ability to provide additional arguments to the ENGOPEN function to suppress the Command Window.

Best Answer

The ability to suppress the MATLAB Command Window when starting a MATLAB Engine session is not available in MATLAB.
As a workaround, you can hide the command window once it has been opened using the ENGSETVISIBLE function. The following lines of code illustrate how you can do this:
Engine *ep;
ep = engOpen(NULL);
engSetVisible(ep, 0);