Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Inter-process communication with MATLAB

Asked by Matthew

Matthew (view profile)

on 13 Jul 2012


I'm looking for a way to pass data back and forth between a MATLAB program and Java program which are running simultaneously on the same server. The data that I shall be passing is both matrices and figures. The method I'm currently using is to poll files, but this is really quite inelegant and slow.

The server is running Linux, so I guess POSIX shared memory would be a possible solution (how do you implement this in MATLAB)? I would prefer something along the lines of named pipes or ports though.

I've read some stuff along the lines of how this kind of thing can be implemented using MEX files. I've never used these, but would be interested to learn if it is indeed the best way to do it. Please could someone point me in a good direction?

With many thanks,



Walter Roberson

Walter Roberson (view profile)

on 13 Jul 2012

Consider using tcp, either from the Instrument Control Toolbox or from the FEX submission "tcpudpip"


Matthew (view profile)


No products are associated with this question.

1 Answer

Answer by Jan Simon

Jan Simon (view profile)

on 16 Jul 2012

Ask the FileExchange for FEX: "java tcp"?


Jan Simon

Jan Simon (view profile)

Contact us