Main Content
MATLAB Automatic Start Error
If you have enabled MLAutoStart
and MLUseFullDesktop
, right-clicking a spreadsheet file in the MATLAB® Current Folder browser and choosing Open Outside MATLAB
causes a MATLAB System Error to appear. To open the file successfully, click End
Now in the error window.
To avoid this issue, disable MLUseFullDesktop
.
MATLAB Version Errors
If the MATLAB version is set incorrectly, MATLAB does not start and displays this error: Unable to start MATLAB.
. Set the MATLAB version using
Please register MATLAB Software as a COM ServerMLProgramId
.
Ensure that the correct MATLAB version appears in the Preferences dialog box before starting MATLAB. For details, see Set Spreadsheet Link Preferences.
If MATLAB is installed on your computer and setting the MATLAB version does not work, use the last registered version to start MATLAB. To specify the last registered version of MATLAB:
-
Shut down all MATLAB and Excel® sessions.
-
Open a command prompt window, and using
cd
, change to the
binwin64
subfolder of the MATLAB installation folder. -
Enter the command:
See Also
MLAutoStart
| MLProgramId
Related Topics
- Installation
- Add-In Setup
- Set Spreadsheet Link Preferences
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
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.
- Use the shortcut %AppData% from Windows Search to jump right to the current user’s hidden AppData folder.
- Browse to the following folder: C:Users%username%AppDataRoamingMathWorksMATLAB
- Rename the folder for your release of MATLAB, e.g R2022a to R2022a_old. Do not remove any folder that ends with «_licenses».
- Recreate the folder you renamed, e.g R2022a and leave it blank. Restart 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
C:ProgramDataMicrosoftWindowsWERReportArchive
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 FilesMATLABR2023abin»
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:
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:
- Open the Oracle Enterprise Single Sign-On Administrative Console.
- Navigate to «Global Agent Settings» > «User Experience» > «Application Response».
- 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:\toolboxmatlab…
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 FilesMATLAB.
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.
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.
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.
Ранее устанавливал на один компьютер Matlab. Успешно устанавливал и работал прекрасно. А затем недавно решил сменить твердотельный накопитель. Соответственно сделал установку системы с нуля и всё такое. И после этого столкнулся с непонятной проблемой запуска Matlab. Появляется окно загрузки программы и всё. Больше ничего происходит. В Диспетчере задач видно, что программа находится в фоновом процессе с нулевой активностью. Иногда могут появиться какие-то доли процента активности. Но ничего не происходит. Но если подождать минут 15 или чуть больше, то окно программы появляется. Но работает очень медленно, как будто ещё не до конца прогрузилась. Заходил на официальный сайт Matlab’а и делал все необходимые манипуляции. Единственное, что работает — это консоль, если запускать Matlab с флагом -nodesktop. Но мне нужен нормальный запуск. Пробовал разные варианты Java — без толку. Хотя до переустановки Java особо и не ставил. Решил проверить на другом компьютере. Установил также и запустил без проблем. Хотя этот компьютер был нагружен сильнее, чем свежеустановленный компьютер. Вот и гадаю, что же я такого упустил. Операционная система во всех случаях — Windows 10.
-
Вопрос заданболее двух лет назад
-
1073 просмотра
I am using Matlab 2014a on windows 8.1 for quite a long time. It was working great until today. Now whenever I open matlab it give me the error shown in the picture.
Ander Biguri
34.9k10 gold badges73 silver badges120 bronze badges
asked Mar 28, 2015 at 20:46
Some of the things you might want to check,
1) Firewall settings that are blocking Mathworks software comms.
2) Java version compatiblity — unlikely but may be possible
3) Licence period on specific toolboxes/blocksets.
answered Mar 29, 2015 at 0:07
ha9u63a7ha9u63a7
6,09314 gold badges72 silver badges104 bronze badges
There are two possibilities which causes this problem
1). one way to solve is by disabling your anti-virus software
2). another is ‘There are components of MATLAB that may not work properly under a different version of the JVM(Java virtual machine)’, check supported jvm version for Matlab 2014a , there might be a latest version change installed recently.
answered Mar 28, 2015 at 23:59
=Anatoliy= писал(а):Здравствуйте. О коде какой программы речь?
Если о содержимом startup.m то вот оно:Код: Выделить всё
cd_path=strcat(prefdir,'cwdhistory.m');
cd_dir=importdata(cd_path);
cd_path=cd_dir{1};
cd(cd_path);
clear cd_path cd_dir;
Ошибка возникает во второй строчке.
Исходя из Вашего сообщения, я предполагаю, что Вы хотите при запуске матлаба переходить автоматически в последний рабочий каталог (который был выбран при закрытии матлаба). Если это так, проверьте наличие файла userpath.m в каталоге «.MATLABR2018btoolboxlocal». Вместо «R2018b» будет ваша версия матлаба.
Если такой файл есть, проверьте наличие еще двух файлов startup.m и finish.m. В случае их обнаружения, дополните их кодом ниже, иначе, создайте их с соответствующими строками кода ниже. Но вышеупомянутый код удалите, он не нужен. Достаточно этих двух строк.
Код startup.m:
Код finish.m:
Пояснения.
1. Файл finish.m может содержать код, который будет выполнен автоматически при закрытии программы матлаб (любого вида). В нашем случае, это сохранение пути рабочего каталога выбранного перед закрытием через userpath.m (переменная pwd).
2. Файл startup.m может содержать код, который будет выполнен автоматически при запуске программы матлаб. В нашем случае, это код перехода в рабочий каталог, который был сохранен при закрытии.
Для создания или изменения этих файлов на системном диске, Вам понадобятся права администратора в случае UAC.
Результатом проделанной работы, будет автоматическое сохранение последнего выбранного рабочего каталога (вместо дефолтного) и переход в него при запуске программы.
P.S. Пожалуйста, если будете обращаться в следующий раз, указывайте кратко цель (которую Вы преследуете), помимо всего прочего конечно
С уважением.