How can I receive a cell array using a UDP port?
Show older comments
I have the following code where I am sending a cell array containing numeric and string values. I want to receive and read this cell array on another client. How can I modify the code to achieve this?
client_port = 10011;
clientAddress = '192.168.100.202';
% Define the cell array
C = {5 "cereal" 110 "C+"; 12 "pizza" 140 "B";...
23 "salmon" 367 "A"; 2 "cookies" 160 "D"};
% Open a UDP port
u2 = udpport("IPV4",'LocalPort',client_port);
for ii = 1:numel(C)
write(u2, C{ii}, class(C{ii}), clientAddress, client_port);
end
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!