How to use a figure as 'if condition'?!
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Fangjun Jiang
2018-7-16
Would this work?
f1=figure;
...
status=close(f1);
You can then check the "status" using "if"
2 个评论
Fangjun Jiang
2018-7-16
a simple example
f1=figure;
set(f1,'DeleteFcn','for k=1:10; disp(k);end')
then close the figure manually
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!