MATLAB: Cannot connect arduino uno to Matlab

arduino uno serial communication

I installed the matlab arduino support package, but when I ty to connect to my arduino uno with:
a = arduino()
I get the following message:
"Unable to load a message catalog 'MATLAB:arduinoio:general'. Please check the file location and format."
I already reinstalled matlab and all the packages, but still the same error occurs.
What is going wrong? thanks in advance!

Best Answer

The error you are seeing is related to how MATLAB stores and displays its error messages.
If you run the following command, what is the output?
which -all arduino
I saw your comment on the file exchange site for the ArduinoIO, so it seems like you are using that version of the support package. For newer MATLAB versions, there is a newer support package, however, reference from that older page:
It seems like there might be some kind of mismatch between your versions. If you install the newer version, the first output from the above command should be
C:\MATLAB\SupportPackages\R2014b\arduinoio\toolbox\matlab\hardware\supportpackages\arduinoio\arduino.m
if you are using Windows. If it is not, there are probably some inconsistencies in the installations (as you have mentioned) which are causing the issue.
Are you using that newer package? If not (or even if you are you might want to try this), it's easiest to install it using the command
supportPackageInstaller
That will install everything in the correct locations.
Related Question