Why do I receive the error "[Fatal Error] :-1:-1: Premature end of file" at MATLAB startup?

조회 수: 59 (최근 30일)
When starting MATLAB, why do I receive the following error?
ERROR: [Fatal Error] :-1:-1: Premature end of file

채택된 답변

MathWorks Support Team
MathWorks Support Team 2023년 4월 18일
편집: MathWorks Support Team 2023년 4월 19일
This error occurs when the MATLAB preferences or path becomes corrupt. To resolve this issue, clear the MATLAB preferences and reset the path. To do so, following these instructions, depending on your operating system:
Windows:
======
1. Browse to your Application Data folder:
C:\Documents and Settings\<username>\Application Data\ (Windows 2000/XP)
C:\Users\<username>\AppData\Roaming (Vista)
Note: this is a hidden folder on all platforms
2. Navigate to the MathWorks\MATLAB folder in Application Data. Remove the folder that corresponds to the MATLAB version (i.e. R2008a).
NOTE: Do not remove any folder that ends with "_licenses."
3. Once this has been removed, restart MATLAB. This directory will be recreated the next time you start MATLAB.
Linux/Unix/Mac:
======
1. In a terminal window, run the following command:
cd ~/.matlab
2. Once in the .matlab folder, delete the folder for the version of MATLAB you have. For example, if you have R2008a, run the command:
rm -rf R2008a
3. Once cleared, restart MATLAB. The preferences should be recreated.
If the error returns, try resetting MATLAB's path using the instructions below:
1. Generate a new pathdef.m file for MATLAB by running the following commands in MATLAB:
restoredefaultpath
savepath
rehash toolboxcache
Once complete, restart MATLAB to enable the changes. If you still encounter an error after following these steps, please contact the Installation and Licensing team here:

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by