I installed the MATLAB support package for arduino in my MATLAB r2013a today. Now I plugged on my Arduino in my usb port.

And ran the command:

a = arduino()

Error: Undefined function or variable 'arduino'.

When I get:

a = arduino('COM18')

Undefined function 'arduino' for input arguments of type 'char'.

I have checked that this package has been installed. The Screenshot

It is grey. enter image description here

Any help will be appreciated.

Thanks very much


  • Is the directory where the arduino package is installed added to the matlab path?
    – crowie
    Oct 22 '16 at 15:49
  • I a newbie to matlab. Can you please eloborate.I did not change any paths while installing.It was the default one. Oct 22 '16 at 15:50
  • Navigate to the package install dir in matlab and right click you should see the add to path option there. If the dir is on the Matlab path it wont be greyed out
    – crowie
    Oct 22 '16 at 15:54
  • actually theres a separate Arduino site on stack exchange you might find better help there
    – crowie
    Oct 22 '16 at 16:00
  • It is grey.See edited question Oct 22 '16 at 16:01

Arduino support within MATLAB came with Matlab-2014a onwards, you are using R2013a

Arduino support within SIMULINK came with Matlab-2012a onwards

for your release you can only interact via a simulink model

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.