How can I programmatically close a Tab in Live Editor?

I want to open a file in the Live Editor to execute its contents and then close it to avoid having too many Tabs open. The command open works fine but close('nameOfFile') does not work.

 Respuesta aceptada

Jacky Tsai
Jacky Tsai el 23 de Sept. de 2022
Editada: Jacky Tsai el 23 de Sept. de 2022
Hi Otto, you can take a look at this thread: https://www.mathworks.com/matlabcentral/answers/507998-how-do-i-close-all-open-scripts-in-the-editor-window. Essentially this boils down to the use of MATLAB Editor API:
doc matlab.desktop.editor

5 comentarios

Thank you for the clue. However that kind of coding does not seem to recognize .mlx files that are open and thus won´t close them on command. Is this a question for future Matlab releases (I guess that Live Editor is quite new)?
Thanks for the note. What MATLAB version are you using?
R2019b.
Hi @Otto Liljansalo, thanks for the response! Please consider upgrading to R2020a (or later), where the support of live scripts using MATLAB Editor API has been introduced.
Ok, thank you for your help in this matter! /Otto

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 12 de Sept. de 2022

Comentada:

el 30 de Sept. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by