So to clarify, you want to have controllers running in Simulink (Matlab) and you'd like to test those controllers out in a physic robotics simulator (Gazebo). I believe that you are talking about this Mathworks tutorial here. In this case, Mathworks made an external gazebo classic plugin that was able to interface with Simulink directly. I do not know if they have made a plugin that is able to work with the new Gazebo (previously called Ignition) so that means you'll need to setup something yourself.
Here are several options:
- Gazebo works with protobuf messages. If Matlab has a way to generate protobuf messages you'll might be able to interface directly with gazebo.
- Gazebo has great ROS 2 integration with the ROS-gz-bridge. If Matlab has a ROS 2 interface then you can use that as the glue between Simulink and Gazebo.
Hope this helps to point you in the right direction!
Disclaimer: I'm not a maintainer of Gazebo and it has been over 7 years that I have worked with Matlab so my knowledge might be outdated.