MATLAB: How to transfer Data Between Two Computers Using GUI MATLAB

udp

I'm in progress the projet for graduating about ANPR relating to transferring data between 2 computer, I tried to use UDP in Command prompt, it's OK. However, When I write in .m flie or in GUI, it always shows error timeout: Warning: A timeout occurred before the Terminator was reached.
ans =
''
How do I fix this error?
Thank you very much.
My file:
In first computer:
%these values to be those of your first computer:
ipA = '192.168.1.7'; portA = 9090;
%these values to be those of your second computer:
ipB = '192.168.1.4'; portB = 9091;
%%Create UDP Object

udpB = udp(ipA,portA,'LocalPort',portB);
%%Connect to UDP Object

fopen(udpB)
fscanf(udpB)
In second computer:
%%Define computer-specific variables
ipA = '192.168.1.7'; portA = 9090 % Modify these values to be those of your first computer.
ipB = '192.168.1.4'; portB = 9091; % Modify these values to be those of your second computer.
%%Create UDP Object
udpA = udp(ipB,portB,'LocalPort',portA);
%%Connect to UDP Object
fopen(udpA)
fprintf(udpA,'number two.')

Best Answer

I have increased Timeout=60; // in second But it still warrant error Timeout? Who can help me, please?