How to set UDP communication in Matlab applications?
15 次查看(过去 30 天)
显示 更早的评论
Hello everyone! I am trying to create two Matlab applications using appdesigner. First one should have TextArea and Button, and when Button is pushed, text from TextArea should be sent to another app and be shown in another app's TextArea. Communication between two apps should be done using udpport. That is the problem I can't solve. Can anyone help me? Be free to attach your solutions! (I am using R2024b, and applications should be on one machine)
0 个评论
回答(1 个)
Walter Roberson
2024-12-20,19:19
%first application
system('matlab -batch SecondApplication() &');
pause(10);
u = udpport();
write(u, 1:5, "uint8", "127.0.0.1", 43219);
%second application
u = udpport(LocalPort=43219);
data = read(u, 5, "uint8");
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!