If MATLAB® terminates unexpectedly, you might lose information. After you start MATLAB again, you can try these suggestions to recover some of the information.
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 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 autosave enabled, you should be able to recover changes you made to files you had not saved.
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.
Some of these suggestions refer to actions you might have needed to take during the session when MATLAB terminated. If you did not take those actions, consider regularly performing them to help you recover from any future abnormal terminations you might experience.