Hey! I need to send data (two rotation matrix) through UDP port. The size of my data is a 3×6 matrix and i'm using this code to send it to a UDP Receive Block on Simulink:
host='192.168.135.240'; port='3333'; echoudp('on',3333); u=udp(host,3333); fopen(u); a=rand(3,3); b=ones(3,3); data=[a b]; fwrite(u,data(:),'double'); fclose(u); delete(u); clear('u'); echoudp('off');
I do receive the data on my UDP receive block and display them in the simulink model, but my problem is that i need to run three times the mfile before the data are shown on the display. The block parameters in the simulink model are shown in figure.
Have you any idea how to solve this problem? Thank you!
Best Answer