How do I send data between two computers using the UDP function from the Instrument Control Toolbox?
23 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2012 年 9 月 10 日
編集済み: MathWorks Support Team
2025 年 10 月 27 日 17:42
I am using the Instrument Control Toolbox, and I would like to communicate between two computers using the User Datagram Protocol (UDP).
採用された回答
MathWorks Support Team
2025 年 10 月 27 日 0:00
編集済み: MathWorks Support Team
2025 年 10 月 27 日 17:42
Please see this example in our documentation for the best way to communicate between two MATLAB sessions using UDP:
1 件のコメント
Walter Roberson
2016 年 10 月 21 日
Nabeel Afridi, you can fwrite() the array in binary, or you can fprintf() the array. The code above shows a string being sent, and strings are arrays (of characters.) If the array is not fixed size you might be wanting to send the size information just before you send the array.
その他の回答 (1 件)
Vinod
2014 年 4 月 14 日
編集済み: MathWorks Support Team
2023 年 4 月 27 日
The UDP protocol does not guarantee transmission or order of the packets.
For most applications, you probably want to use TCPIP, like this:
1 件のコメント
Walter Roberson
2014 年 4 月 14 日
Real-time communications require UDP rather than TCP, as TCP has no upper bound on packet delivery time and does not allow later packets to be delivered.
TCP is also not usable for broadcasting of any kind.
Effectively all other IP protocols other than TCP are unidirectional, so there are a lot of different applications where in-order guaranteed delivery is not suitable.
参考
カテゴリ
Help Center および File Exchange で Development Computer Setup についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!