Hi All! I found a nice workarround to comunicate with a websocket from MatLab! Python (i'm currently using the version 3.6) can comunicate easily with websockets due to the the websocket-client package (pip3 install websocket-client). As much as easily python can stand a websocket, Matlab can call python functions!
Here a bit of exemplary code:
1) Create a function.py file with the function for the websocket comunication
import websocket as ws_lib
ws = ws_lib.create_connection(Str)
You have to save the python file in your working folder, and than you can call the function from matlab, as in the following exemplary code:
Now you have an output in python string format. To work with standard matlab string you should convert the result with one of the following commands
For further information you should look at the matlab reference for caling python function Python and Matlab and the python websocket-client references Python Websocket
Good coding to all! Luca M.