There are a couple things that can lead to this error.
1. Has the Arduino device driver been properly installed? You can check that by looking at the Device Manager and see if the Arduino shown as a recognized COM port.
2. Were you able to program the board outside of MATLAB, like just using the Arduino IDE? When you mentioned that COM3 is open, were you using it elsewhere or opened the serial port yourself in MATLAB? The support package requires the COM port to not be in use or open before calling arduino command
3. Lastly, you can turn on the TraceOn parameter to inspect the compile and upload errors when calling arduino, instructions to do that can be seen in the troubleshooting of the MATLAB Support Package for Arduino document.
Hope this helps, Menghan
(MATLAB Hardware team - MathWorks)