- Drag and drop the "UDP Receive" block from the Simulink Library Browser into your model.
- Double-click on the "UDP Receive" block to open its parameters dialog box.
- Set the "Local IP port" parameter to the port number that your Simulink model will use to receive UDP packets.
- Click the "Apply" button to apply the changes.
- Connect the output of the "UDP Receive" block to a MATLAB Function block.
- Connect the output of the MATLAB Function block to the input of a "UDP Send" block.