socket programming in MATLAB?

后端 未结 4 665
滥情空心
滥情空心 2021-01-14 23:03

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?

相关标签:
4条回答
  • 2021-01-14 23:18

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

    0 讨论(0)
  • 2021-01-14 23:26

    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.

    0 讨论(0)
  • 2021-01-14 23:32

    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.

    0 讨论(0)
  • 2021-01-14 23:41

    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.

    0 讨论(0)
提交回复
热议问题