2

i have two machines running MATLAB and i need to exchange information(numbers,images) between them,is there a way in MATLAB i can do it?

intrinsic
  • 55
  • 1
  • 2
  • 10

4 Answers4

2

If you have Parallel Computing Toolbox and MATLAB Distributed Computing Server, you can use MPI-style programming to send data between the two MATLAB processes. You can use functions like labSend and labReceive to send and receive data.

Edric
  • 23,676
  • 2
  • 38
  • 40
2

There are several possibilities without any extra toolboxes, depending on your specific needs. Check the Matlab help about external interfaces for details. For high performance, mexing a custom C communication is probably your best option. Using shared files on a network storage would be an alternative that is easier to implement but less effective, especially if you need frequent communication.

groovingandi
  • 1,986
  • 14
  • 16
0

for an example of socket programming in MATLAB using Java, see this related post

Community
  • 1
  • 1
Amro
  • 123,847
  • 25
  • 243
  • 454
0

Adding some specifics to other answers, here's an example of using Java for sockets. multicore and MatlabMPI use the filesystem, so I believe if you have a shared network filesystem you could use them across machines. And here is an old implementation in C++.

We have direct experience only with multicore, which is the least like real socket communication out of the above, but it gets the job done for coarsely parallel jobs.

Chinasaur
  • 2,108
  • 2
  • 16
  • 17