https://kr.mathworks.com/help/ros/ref/isnoderunning.html
isNodeRunning - Determine if ROS or ROS 2 node is running - MATLAB
This MATLAB function determines if the ROS or ROS 2 node associated with the specified Simulink model is running on the specified rosdevice or ros2device,...
determinerosnoderunningmatlab