Firstly, you will need to install five Add-ons which are used in the Arduino engineering kit projects.
After installing the 5 Add-ons if you receive a
fatal error: Arduino.h: No such file or directory follow the instructions below.
arduinoio.PackageRooton MATLAB Command Window, this will tell you the Arduino Support Package root location, e.g.
Uninstall both MATLAB and Simulink support packages for Arduino by selecting Add-Ons from the MATLAB Toolstrip as shown in the image below and click on manage Add-Ons.
Next, go to this location and ensure no more files are left, and feel free to delete any left over.
Then close MATLAB, right-click on MATLAB icon and select ‘Run as administrator’.
Reinstall both support packages.