If MATLAB® terminates unexpectedly, then you might lose information. After you start MATLAB again, you can try the following suggestions to recover some of the information. Some of these suggestions refer to actions you need to take during the session before MATLAB terminates. If you did not take those actions, then consider regularly performing them to help you recover from any future abnormal terminations you might experience.
Use the Command History or the file on which it is based,
history.m, to run statements from the previous session.
You might be able to recreate data as it was before the termination.
If you used the
diary function or
-logfile startup option for the session in which
MATLAB terminated unexpectedly, then you might be able to recover
If you saved the workspace to a MAT-file during the session, then you can recover it by loading the MAT-file.
If you were editing a file in the Editor when MATLAB terminated unexpectedly, and you had the backup feature enabled,
then you should be able to recover changes you made to files you had not saved.
To recover, open the backup version
in the Editor.
Then save it as
the last good version of
If you were in a Simulink® session when a segmentation violation occurred, and you have the Simulink Autosave Options preference selected, then the last autosave file for the model reflects the state of the autosave data before the segmentation violation. Because Simulink models might be corrupted by a segmentation violation, a model is not autosaved after a segmentation violation occurs. To recover the file, open the model.