How to close editor from the command line?

17 次查看(过去 30 天)
I accidentally opened a huge file in the editor and it won't close, and when I restart Matlab the editor reopens the huge file. Is there a way to close the editor from the Matlab prompt? If it matters, I have several mfiles open in different tabs of the editor, but fine to close them all.
  1 个评论
jessupj
jessupj 2025-3-3
do we have an update to this for 2022ish and later versions?
>> com.mathworks.mlservices.MLEditorServices.closeAll
Unrecognized function or variable 'closeAll'.

请先登录,再进行评论。

采纳的回答

Joseph Cheng
Joseph Cheng 2016-6-3
编辑:Joseph Cheng 2016-6-3
you can call com.mathworks.mlservices.MLEditorServices.closeAll
you can read up all about this on the http://undocumentedmatlab.com/blog/accessing-the-matlab-editor page
incase the editor ties you up so you still cannot access the command window then try creating a start up file http://www.mathworks.com/help/matlab/ref/startup.html or move the large file from where it is so matlab "errors" when trying to load the file

更多回答(1 个)

Steven Lord
Steven Lord 2016-6-4
Use the MATLAB Editor API introduced in release R2011a.

类别

Help CenterFile Exchange 中查找有关 Debugging and Analysis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by