| Applicable Versions | NetSim Standard | NetSim Pro |
| Applicable Releases | v13 | v14 |
Project Download Link:
| NetSim v13.1 | ![]() |
| NetSim v13.2 | ![]() |
| NetSim v14.2 | ![]() |

NetSim can be interfaced with MATLAB, which allows users to interact with it during run-time. MATLAB can interact and control the behavior of SIMULINK Models. In order to interface NetSim with SIMULINK, the existing MATLAB Interfacing can be utilized. NetSim can interact with SIMULINK Models and control its behavior via MATLAB.
Software Tools used to perform interfacing:
SIMULINK - Water Supply System:
In this example we consider a Water Supply System Model in SIMULINK as shown below:
Reference: https://in.mathworks.com/help/physmod/hydro/examples/water-supply-system.htmlNetSim - Water Supply System in 5G Network

This model consists of four tanks and the readings of the volume of water in each of the tanks are taken periodically and sent to the MATLAB workspace.
NetSim - Simulink Interfacing:
Upon interfacing NetSim with MATLAB the following tasks are performed during the simulation start:
Upon simulating a network created in NetSim the following tasks are performed periodically:
During the Simulation the SIMULINK Model is started and paused several times for NetSim and SIMULINK simulations to run synchronously. The readings obtained from SIMULINK are read from MATLAB workspace and appended to the payload of the packets generated in NetSim. In this example readings are taken every one second and appended to the packet payload.
Output/Metrics specific to this example:
Running Water Supply System simulation by interfacing NetSim

Analyzing the output Metrics specific to this example:


Note: For different versions of MATLAB, SIMULINK *.slx file can be found as explained in https://in.mathworks.com/help/physmod/hydro/examples/water-supply-system.html