MATLAB: Does connection error pops up

arduinomakerMATLAB

Whenever I try to connect Matlab with arduino I get :
>> a=arduino
Failed to open a connection at serial port /dev/cu.usbmodem1421.
Make sure the port or address is correct and the Arduino hardware
is properly plugged in. For troubleshooting, see Arduino Hardware
Troubleshooting.
The port connection is correct though (it works in arduino application).
System: macbook pro 2012
edit: when I restart matlab it doesn't appear any reasons?

Best Answer

I have had similar issues in the past on Windows machines and I usually put the board in bootloader mode to make the error go away.
Note for new Arduino users - Double pressing the reset button makes the board go into bootloader mode.
Related Question