Technical Solutions
Why do I receive this error, [Fatal Error] :-1:-1: Premature end of file on startup in MATLAB?
Date Last Modified: Wednesday, December 16, 2009
| Solution ID: |
|
1-63Z0WN |
| Product: |
|
MATLAB |
| Reported in Release: |
|
R2009a |
| Platform: |
|
Windows |
| Operating System: |
|
Windows Any |
Subject:
Why do I receive this error, [Fatal Error] :-1:-1: Premature end of file on startup in MATLAB?
Problem Description:
When starting MATLAB, I receive this error,
[Fatal Error] :-1:-1: Premature end of file
Solution:
This error occurs when the MATLAB preferences or the path becomes corrupt in MATLAB. To resolve this issue you can clear the MATLAB preferences and reset the path. To do so, run the following steps, 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. Open the Terminal Application (usually found in Applications or Utilities). 2. In the terminal window and run the following commands:
cd ~/.matlab
3. 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
4. Once cleared, restart MATLAB. The preferences should be recreated.
If the error returns, you can 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 to reset the path:
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
|