I am trying to establish this connection using the same code in the link
How To Send Data From The Arduino To MATLAB
but when I run the Matlab I get this error
Error using serial/fopen (line 72)
Open failed: Port: COM4 is not available. No ports are available.
Use INSTRFIND to determine if other instrument objects are connected to the requested device.
Please any body has an idea why I am getting this error???