Since we were using the trial version of MATLAB R2020b we could connect MATLAB with a ROS topic and receive newly published data with the receive command of the ROS toolbox.
However the same code does not work with MATLAB R2020a (we use a licensed version now). We do see the topic with rostopic list. We can also see incoming data with rostopic echo /topic within MATLAB. Initially we used a custom message format but we also checked it with a simple String. Furthermore we tried the receive command with and without timeout, makes no difference.
We are using ROS Kinetic (LINUX UBUNTU) and as mentioned before MATLAB R2020a (LINUX UBUNTU). We ran the software on two different PCs and also tried it on one single PC.
While debugging the program pointer is not jumping over the receive command.
We use the following simple test script:
sub = rossubscriber('/test_state', 'std_msgs/String');
a = receive(sub);
b = assembly_state.Data;