The MATLAB tutorial doesnt cover this aspect well about when you have matlab and gazebo running on the same linux machine with no virtual box.
Change your linux ethernet interface ip address statically using:
sudo ifconfig eth0 192.168.1.1 netmask 255.255.255.0
assign to ros master the same ip address using:
export ROS_MASTER_URI=http://192.168.1.1:11311 >> ~/.bashrc
export ROS_HOSTNAME=192.168.1.1 >> ~/.bashrc
export ROS_IP=192.168.1.1 >> ~/.bashrc
assign to matlab ros, an ip address in same subnet as the master above using :
setenv('ROS_IP','192.168.1.100:11311')
setenv('ROS_IP','192.168.1.100')
start rosmaster in terminal using : roscore
start gazebo model in terminal
connect to rosmaster ip adress in MATLAB using: rosinit('192.168.1.1:11311')
Now you should see gazebo and ros topics in matlab command window
You can also follow the matlab tutorial to see how much more you can do