Receiving information with TCPIP object

Greetings, I have written a script to receive an array of numbers from another computer with a TCPIP object, I'm doing so with an event function handler. Here's my code:
t = tcpip('0.0.0.0',30000,'NetworkRole','server');
t.BytesAvailableFcnCount = 20;
t.BytesAvailableFcnMode = 'byte';
t.BytesAvailableFcn = @received;
fopen(t)
and here's the "received" function:
function X=received(t,A)
X=fread(t,t.bytesavailable/4,'float')
end
The information is received without errors, but for some reason the number array I receive is not stored in the "X" variable or anywhere, I have no idea what the problem could be. Can any of you help me with this issue?

Respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Preguntada:

el 13 de Nov. de 2013

Editada:

el 13 de Nov. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by