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?

7 ビュー (過去 30 日間)
David
David 2024 年 8 月 7 日
回答済み: Aditya 2024 年 8 月 7 日
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
dpb 2024 年 8 月 7 日
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
Star Strider 2024 年 8 月 7 日
The only documentation that I can find for the MATLAB Edittor is matlab.editor Settings.
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.
.

Aditya
Aditya 2024 年 8 月 7 日
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!

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by