Recovering Data After an Abnormal Termination

If MATLAB® terminates unexpectedly, 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, 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, you might be able to recover output.

  • If you saved the workspace to a MAT-file during the session, 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, you should be able to recover changes you made to files you had not saved. To recover, open the file in the Editor.

  • If you were in a Simulink® session when a segmentation violation occurred, and you have the Simulink Autosave Options preference selected, note that 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.

See Also

| |

Related Examples

More About

Was this topic helpful?