Hey. A great programme. I have one remark though. If one has many iterations of the function, let's say in a while-loop receiving realtime udp-packages the socket is opened and closed in every call. This is not criticism, I think an experienced MATLAB programmer will have no problem redesigning the code. BTW, if anyone has a solution for my problem I would be very grateful as my MATLAB skills are limited.