Hi Andy,
As per my understanding, you are facing issues with using a serial port from MATLAB.
You can connect to a serial port with the help of the ‘serialport’ function in MATLAB. To establish a connection, the arguments ‘port’ (serial port name) and ‘baudrate’ are to be passed to the function, as mentioned in the code statement below:
s = serialport(port,baudrate)
Please note that the target hardware must be connected to your device to establish the connection using the ‘serialport’ function.
Once the connection is established, data can be written to or read from the serial port by using the ‘write’ and ‘read’ object functions respectively.
For more information on the ‘serialport’ function, please refer to the following documentation: