ironzionlion
ironzionlion

Reputation: 889

Close Variable Editor by commands

Is there a way to close the Variable Editor from MATLAB by using commands?

I assume that it can be done by getting the properties of the Variable Editor.

Upvotes: 5

Views: 1956

Answers (1)

CitizenInsane
CitizenInsane

Reputation: 4855

You can do it like this:

% Get access to matlab desktop
desktop = com.mathworks.mde.desk.MLDesktop.getInstance();

% Close the variable editor
desktop.closeGroup('Variables');

NB: If you neeed to, use desktop.getGroupTitles() to obtain the name for other windows ('Command History', 'Workspace', etc...).

Upvotes: 10

Related Questions