How to use a figure as 'if condition'?!
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
sajjad hosseinifard
am 16 Jul. 2018
Kommentiert: Fangjun Jiang
am 16 Jul. 2018
I's using an m file to plot some data, online. I want to make an 'if condition', when I close the figure that is plotting my data manually!! Shortly, How could I Initialize a loop by closing a specific figure?!(as I close the figure the loop being started)
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 16 Jul. 2018
Would this work?
f1=figure;
...
status=close(f1);
You can then check the "status" using "if"
2 Kommentare
Fangjun Jiang
am 16 Jul. 2018
a simple example
f1=figure;
set(f1,'DeleteFcn','for k=1:10; disp(k);end')
then close the figure manually
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Performance finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!