UDP channel between matlab and Eclipse

1 次查看(过去 30 天)
aida
aida 2012-4-10
How can I set up a UDP channel between Matlab and Eclipse that send some matlab's output for Eclipse ? I should write a server in Matlab and a client in eclipse . the client will ask for some data and the server will send that data to client .
any ideas how to do this ? any examples? I'm not familiar with Matlab or socket programming at all , please help !

回答(1 个)

Walter Roberson
Walter Roberson 2012-4-10
You can use the udp() function of the Instrument Control Toolbox to set up the server. After that you use fread() or similar routines, and fwrite() or fprintf(). You might also end up setting up callbacks for automatic operation when data is received.
There is also a MATLAB File Exchange contribution tcpudpip that can be used instead of the Instrument Control Toolbox.
  4 个评论
aida
aida 2012-4-13
in which format should I send data so that I dont need to convert it again in eclipse?
Walter Roberson
Walter Roberson 2012-4-13
I don't know enough about eclipse to answer that, but text seems likely to be the answer.

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by