I have a very simple setup where I am generating a sine wave in simulink and sending it through a UDP block.
On the other hand I have MATLAB where I want to asynchronously fire a callback as soon as a packet is received.
On simulink I have my remote address set to 127.0.0.1 and my port to 25000.
In MATLAB I am using the following code.
u = udp('127.0.0.1', 25000);
u.ReadAsyncMode = 'continuous';
u.BytesAvailableFcn = 'myfunction';
where myfunction simply prints a string.
However the callback is not being executed at all (it does work with echoudp). What could I be doing wrong?