MATLAB: Does the ‘>>’ prompt not appear in the MATLAB Engine on Linux but does appear in Windows

macMATLAB

I have called the MATLAB Engine from a C application on both Windows and Linux machines. In Windows, when MATLAB opens, the '>>' prompt is visible, informing me that I can now interact with the engine.
In Linux, however, when the engine opens, the prompt is not visible.

Best Answer

The ability to have the ">>" prompt displayed is not available when using the MATLAB Engine API on Linux and UNIX systems.
There are no workarounds.
The MATLAB Engine on the Windows platform is implemented using the Microsoft COM interface whereas the Engine on UNIX and Linux communicates using pipes. As a result, the ">>" prompt will appear in Windows but not in Linux.
The ">>" prompt displayed in the engdemo.c example are printed explicitly by the C program. Open the engdemo.c program using the following commands and you will notice that the '>>' prompts are being manually displayed by a printf statement.
demofile = [matlabroot '/extern/examples/eng_mat/engdemo.c'];
copyfile(demofile, '.');
edit engdemo.c;