how to close visdiff window from command line

Dear Matlabbers,
Does anyone know if it is possible/how to close the visdiff output/Comparison window from the command line?
I'd like the outputwindow to be opened for a couple of seconds and then automatically close it from the command line; simply not opening the window in the first place is not what I'm looking for.
So, e.g.:
visdiff(file1.txt, file2.txt)
* opens visdiff window/comparison result *
(Insert: some code to close comparison window from command line)
* visdiff window closes*
Thanks in advance!

2 Comments

ABC DEF
ABC DEF on 16 Apr 2020
Edited: ABC DEF on 6 May 2020
Never mind, I've found the solution myself. For anyone for whom it may be of help:
desktop = com.mathworks.mde.desk.MLDesktop.getInstance();
desktop.closeGroup('Comparison');

Sign in to comment.

Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Asked:

on 16 Apr 2020

Commented:

XIN
on 28 Jun 2022

Community Treasure Hunt

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

Start Hunting!