Recover former state of Matlab Editor
87 ビュー (過去 30 日間)
古いコメントを表示
I had quite a few files open in the Matlab Editor, but then inadvertently closed the editor window. Is there any way to re-open the editor in a way that recovers its state from before I closed it, i.e., so that the files I had open are automatically open in the editor again, without me having to open them manually, one by one. It seems like the editor does have some memory of its state in some situations, because for example when I close and restart Matlab, the editor does come up again in its former state.
0 件のコメント
採用された回答
Mario Malic
2021 年 2 月 24 日
編集済み: Mario Malic
2021 年 2 月 24 日
Hi Matt,
Actually, Yair Altman has already mentioned this https://undocumentedmatlab.com/articles/recovering-previous-editor-state
It looks like the info about the editor data, at least on Windows, is kept in file MATLABDesktop.xml
winopen(prefdir)
On the bottom of the file you can find the files that will be opened the next time you start the MATLAB. When you close the file in Editor, the xml file automatically updates and then this .m file won't be opened in Editor the next time.
There's also file MATLABDesktop.xml.prev, which probably stores the same file but from the previous version. Which might be what you're looking for. If you opened/closed MATLAB more than twice with different files open in Editor, then data about previous files is probably lost.
2 件のコメント
Ernesto Soares
2024 年 7 月 15 日
THANK YOU Matt J!!!!! I nearly fainted when I accidentally closed the editor.
その他の回答 (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!