Why will MATLAB not start up properly on my Windows based system?

1,467 views (last 30 days)
MATLAB will not start up on my Windows system, and I am not receiving license manager errors.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Nov 2024 at 0:00
Edited: MathWorks Support Team on 19 Nov 2024 at 15:00
If MATLAB is not launching properly, and you are not receiving any License Manager Errors, then you may be experiencing one of the following problems:
  • Computer needs to be restarted
  • Corrupt preferences
  • Security software or other third party software interfering with MATLAB
  • Issue with Java environment
  • Installation directory
  • Username has a non-ASCII character
  • Single Sign-On (SSO) software interfering with MATLAB
  • Clearing the TEMP directory
  • Malfunctioning printer drivers

 

Problem #1: Computer needs to be restarted
Sometimes, another program or issue with the computer may be preventing MATLAB from starting. Restarting your computer may stop what is interfering with MATLAB launching correctly.
Problem #2: Corrupt preferences
One of the most common reasons MATLAB will fail to start is that something has corrupted the MATLAB preferences directory. You will need to reset your preferences to fix this.
  1. Close MATLAB
  2. Press the Windows Key + R on your keyboard
  3. In the newly opened window in the bottom left corner of your screen type in the following: %appdata%
  4. Press Enter on your keyboard. This should bring you into folder named "Roaming".
  5. Navigate into the "MathWorks" folder and then "MATLAB" folder.
  6. Rename the folder for your release of MATLAB, e.g R2024a to R2024a_old. Do not remove any folder that ends with "_licenses".
  7. Launch MATLAB
The preferences will be regenerated automatically when you start MATLAB.
If you are using a roaming profile, please see the related article:
There will be some cases where the preferences directory is not being written to. In this case, you can set a MATLAB_PREFDIR environment variable to a temporary writable directory. Please see the article below for more details on how to set an environment variable. 
Problem #3: Security software or other third party software interfering with MATLAB
Check any of your security software logs to see if it is preventing MATLAB to start properly. Programs such as Symantec, McAfee, Kaspersky, AVAST, TrendMicro, BitDefender, and Webroot have all been known to prevent proper MATLAB startup. 
If necessary, set exceptions so that MATLAB can start. You may need to consult your IT staff or your security software vendor for assistance in creating exceptions. 
In some cases, startup issues that are caused by common antivirus software could be diagnosed using the Windows Error Reporting log files. These log files are located in the following directories and can be read with a text editor like Notepad:
C:\Users\%username%\AppData\Local\Microsoft\Windows\WER\*  C:\ProgramData\Microsoft\Windows\WER\ReportArchive
Check the folders within this directory (eg: ReportArchive) for files either created around the time that MATLAB failed to startup or contain the name MATLAB or JAVA. 
Furthermore, Third-party software, such as AppSense, DeviceLock, NVIDIA RTX Desktop Manager Software, and LastPass has been known to cause issues. Disabling this software may resolve MATLAB startup issues.
Problem #4: Issue with Java environment
MATLAB has a command-line environment in addition to the normal MATLAB Desktop environment. This environment is not dependent on Java and can be useful for troubleshooting MATLAB. To launch MATLAB with no desktop environment:
Try launching MATLAB with each of the below commands from Windows's Command Prompt.
matlab -nojvm matlab -softwareopengl matlab -nodesktop
If "matlab" is an unknown command, use the command below to navigate into the MATLAB installation directory first. You will need to adjust the release number to your release of MATLAB, if you're not using R2023a.
cd "C:\Program Files\MATLAB\R2023a\bin"
If MATLAB starts with the -nodesktop flag, try typing 'desktop' after opening MATLAB in the command prompt to see if it will open in the full graphics mode. If MATLAB starts in either of these modes, this likely indicates a problem with your Java configuration. You can check to see if there is a MATLAB_JAVA environment variable that may be changing the JVM that MATLAB is using. If this variable exists, try removing it. 
If MATLAB fails to start in either of these modes, more information may be obtained from the MATLAB crash dump files. To find these files, check your Temp folder:
C:\Users\%username%\AppData\Local\Temp
The files will have names like:
matlab_crash*.XXXX java.log.*
Problem #5: Single Sign-On (SSO) software interfering with MATLAB
If the machine in question has SSO software installed, temporarily disable the SSO software then try to open MATLAB. If MATLAB launches, contact your IT department to allow/whitelist MATLAB from the SSO software, or disable SSO entirely.
Configure Oracle SSO to exclude MATLAB:
  1. Open the Oracle Enterprise Single Sign-On Administrative Console.
  2. Navigate to "Global Agent Settings" > "User Experience" > "Application Response".
  3. Locate the field that allows you to specify "Applications that hooks should ignore".
Problem #6: Installation directory
MATLAB may not start properly if it is not installed in its own contained folder or the folder contains non-ASCII characters. While non-default installation locations are fine, installing them into a directory with multiple non-MATLAB files in it can cause issues. For example, installing MATLAB directly into the C:\ drive will cause startup issues. Having MATLAB installed in a folder with non-ASCII characters will also cause startup issues.
For this reason, it is recommended you install in either the default location or have the installation folder prefaced with MATLAB.
If you are getting error messages related to:
Attempt to execute SCRIPT as a function. C:\\toolbox\matlab\...
It is the result of installing MATLAB directly to the C: drive. MATLAB must be uninstalled and then reinstalled to the default path, C:\Program Files\MATLAB.
Problem #7: Clearing the TEMP directory
Deleting everything in your TEMP directory can resolve MATLAB startup issues. To access your TEMP directory, open Windows Explorer and type the following in the address bar.
%TEMP%
You can safely delete everything in this folder as these are just temporary files.
Problem #8: Username has a non-ASCII character
If your username has a non-ASCII character in it, MATLAB will not boot up properly. This usually manifests as a Java error. Try setting the MATLAB_PREFDIR environment variable to a location that does not use any non-ASCII characters. If this does not work, you will need to create another Windows username with ASCII characters to work around this issue.
Problem #9 Corrupted or malfunctioning printer driver
A malfunctioning printer driver can sometime cause this problem. This may potentially be seen in a crash log. You can often fix this by setting your default printer as "Microsoft Print to PDF" or reinstalling your printer drivers.
If this still does not work please try these other workarounds:
  1. Remove the printer from your list of devices in your control panel. The printer would be located in the Devices and Printers control panel for most Windows OS's.
  2. End the print spooler/driver process inside of your Task manager and start MATLAB.
Changing the default printer to another printer, or to the generic printer that Windows automatically creates under "Devices and Printers" within the Windows Control Panel. Additionally, changing the startup type of the printer spooler service from automatic to manual has fixed nondescriptive MATLAB startup issues. 
My problem is not listed here
If you are still unable to start MATLAB after these troubleshooting steps, please contact MathWorks support:
Please include any log files, error messages, and screenshots pertaining to the problem with your help request.
  1 Comment
Image Analyst
Image Analyst on 17 Aug 2018
Call them. The Mathworks gives free and fast help for starting MATLAB to anyone even students.

Sign in to comment.

More Answers (1)

Fernando Fuentes Molina
Fernando Fuentes Molina on 20 Jun 2020
[Spanish]: Muchas gracias! Lo solucioné con la propuesta #4.
[English]: Thanks you so much! I solved my problem with the solution for Issue with Java environment

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

No tags entered yet.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!