MATLAB: How to make the two standalone applications compiled with MATLAB Compiler 4.8 (R2008a) communicate with one another

communicateexeexecutableMATLAB Compilermemorysharesockettalk

Using the MATLAB Compiler, I want to create two standalone applications that have the ability to talk to each other.
Is there a shared memory mechanism in MATLAB that will allow me to do so?

Best Answer

Memory-mapping of files in MATLAB provides a mechanism for sharing data between applications. Please see the following Help webpage for more information:
Also note that the 'memmapfile' class can be compiled with MATLAB Compiler 4.8 (R2008a). The Memory-Mapping demo provided in the documentation can be easily used to demonstrate communication between two executables.
Compile the two function MATLAB files SEND and ANSWER in the demo into standalone applications:
>> mcc -m send
>> mcc-m answer
Run the two generated standalone applications separately, and input messages into SEND.EXE's console window for sending. You will see them reappear in the console window of ANSWER.EXE.