On a Windows® platform, you can attach an engine program to a MATLAB® session that is already running by starting the MATLAB session with /Automation in the command line. When you call engOpen, it connects to this existing session. You should only call engOpen once, because any engOpen calls now connect to this one MATLAB session.
The /Automation option also causes the command window to be minimized. You must open it manually.
Note: For more information on the /Automation command-line argument, see Launch MATLAB as Automation Server in Desktop Mode. For information about the Component Object Model interfaces used by MATLAB, see MATLAB COM Integration.
where d:\matlab\bin\win32 or d:\matlab\bin\win64 represents the path to the MATLAB executable.
This does not start another MATLAB session, but rather uses the MATLAB session that is already open.