how to forbid several calls to the same function
显示 更早的评论
I have a function, myfun, which generates a user interface with several graphic objects. So, when I run myfun, I have still the possibility to enter commands in the MATLAB command window. How can I test if myfun is already running, in order to forbid a new call to myfun in the MATLAB command window ?
采纳的回答
更多回答(2 个)
Sean de Wolski
2011-12-12
One way would be to save the figure and then use the openfig, with the reuse option.
doc openfig
1 个评论
Jan
2011-12-12
The saved figure might not be compatible to older oder future versions of Matlab.
类别
在 帮助中心 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!