It's possible that the version of MATLAB you're using is causing the problem. The Arduino Support Package may not be compatible with MATLAB R2017a.
One possible solution is to try installing an older version of the Arduino Support Package that is compatible with MATLAB R2017a. You can try downloading the previous versions of the support package from the MathWorks website.
Another solution is to try updating your version of MATLAB to a newer version. MATLAB R2017a is a relatively old version and there have been several updates since then. It's possible that a newer version of MATLAB may have better compatibility with the Arduino Support Package.