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?
25 次查看(过去 30 天)
显示 更早的评论
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 个评论
dpb
2024-8-7,15:42
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...
回答(2 个)
Star Strider
2024-8-7,16:12
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 个评论
Aditya
2024-8-7,20:49
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!