Created: by Former ITECS Employee // Last Modified: by mgandhi

Matlab for Windows requires Virtual CloneDrive prior to installation.

Matlab is now available for all NCSU students for their personally owned computers. Visit the How to Get Matlab page for information for College of Engineering students.  On the left, there will be a login prompt and you will need to login in order to view the download link for Matlab.

Note: Students needing to update their Matlab license may visit the How Do I Update My Matlab Student License page for instructions.

MATLAB Post-Installation Error Initial Startup

After the installation of MATLAB, an error may appear such as “Warning: Name is nonexistent or not a directory: <pathname>”. This error can be explained by one of the following:

  1. The indicated directories are in the ‘pathdef.m’ file used by MATLAB, but the directories do not exist in the file system.
  2. The directories are added to the MATLAB path using a custom ‘startup.m’ file and the directories do not exist in the file system.

Possible Solutions
Begin by typing which —all pathdef.m  in the MATLAB prompt. The top line of the output represents the ‘pathdef.m’ file used by MATLAB. If this line is not $matlabroot\toolbox\local\pathdef.m that means the pathdef.m was not updated and the directory structure of the MATLAB-code has been changed since the previous version of MATLAB.

If you did not make the file that appears in the top output line, or if you want to use the latest pathdef.m file updated by the installer, then try renaming/deleting all the pathdef.m files in the output EXCEPT $matlabroot\toolbox\local\pathdef.m

However, if you want to use the same pathdef.m file, please refer to the following:

  1. Update the ‘pathdef.m file with the latest data path by typing the following in the MATLAB prompt:
    >>restoredefaultpath; savepath; 
    Note: This will delete all of the previous path data and replace it with the factory default settings. Therefore, you may want to back up the old pathdef.m file so that you can use the information at a later time. 

If none of the above solutions help with this problem, there is a possibility that a ‘startup.m’ file exists which is adding non-existent directories to the path. To fix this, you can alter the startup.m file by typing >>edit startup.m in the MATLAB prompt. Then, delete the lines that are adding the directories that are appearing in the warning message.

For the full article, please refer to the online forum post by the MathWorks Support Team

Matlab Error with Java: On a Mac

After you have downloaded the installer for Matlab and cannot open it automatically:

  1. Go to the downloaded file download_agent.
  2. Double click.
  3. Choose open with and browse to Java. If Java isn’t there, install Java. If you install Java and it still doesn’t appear, open download_agent through terminal.
    Note: To install Java, go to Follow the onscreen instructions.
  4. Open terminal.
  5. Through Terminal, change directory to were ‘download_agent’ is saved on your computer. Typically, it will be in your Downloads folder. To change directory to your Downloads folder, type cd downloads in Terminal and press Enter.
  6. In the terminal, type in
  7. This should take you to the installer.


Leave a Comment …

You must be logged in to leave a comment