Skip to Main Content Skip to Search
Home |   한국  Choose Country  |  Contact Us  |  Cart Store 
Create Account | Log In
제품 및 서비스 산업분야별 대학 커리큘럼 Support User Community 회사소개

Technical Solutions

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


Date Last Modified: Wednesday, May 19, 2010
Solution ID:   1-63Z0WN
Product:   MATLAB
Reported in Release:   R2009a
Platform:   Windows
Operating System:   Windows Any
 

Subject:

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

Problem Description:

When starting MATLAB, why do I receive the following error?
[Fatal Error] :-1:-1: Premature end of file

Solution:

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:
======
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:

http://www.mathworks.com/support/contact_us/index.html

Please provide feedback to help us improve this Solution
현재 페이지 인쇄
전자메일로 페이지 보내기
현재 페이지 인쇄