I open Matlab after a computer crash and the editor is clear . Is there a file which stores which files were open prior to the crash?
6 views (last 30 days)
Show older comments
Matlab closed incorrectly after a PC shutdown. When I restarted, all of the open m-files open in the editor have gone (as tabs, not from the hard drive). Is there any record of the open files anywhere?
Thks
1 Comment
dpb
on 7 Aug 2024
In that case, the last conditions when closed got lost, probably not worth the effort to try to retrieve.
Try using the command history, "edit" and up-arrow will return the files you opened to edit; unfortunately, those that may have used the Ctrl-D key to open from inside won't be there...
Answers (2)
Star Strider
on 7 Aug 2024
I am not certain where that information is stored. It does not appear (to me) to be documented. It would be nice to be able to access that information and back it up to a different file.
Use that lilnk to work with the Editor. Another option is to check your Preferences (do this by clicking on Preferences on the MATLAB desktop) and be sure that ‘On restart reopen files from previous MATLAB session’ is checked. I am not certain that will help you recover them currently.
I have had that problem in the past, and have ‘sort of’ solved it by creating a ‘crash recovery’ list of tabs (as part of an a .m file) that I characteristically have open. That lists as:
% edit First_File.m
% edit Second_File.m
(with their actual names) and so forth for all of them. I then run that (after removing the % signs by un-commenting them) and it restores the tabs in a new Editor session. The list occasionally needs to be updated if I have new tabs I want to be kept open, however that is relatively straightforward.
That’s the oinly solution I’ve found so far.
.
0 Comments
Aditya
on 7 Aug 2024
Hi David,
You can refer to this MATLAB documentation to read about the possible workarounds:
Also you should refer to this MATLAB answer post by MathWorks Support Team on the same issue:
Hope this helps!
0 Comments
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!