简体   繁体   English

如何仅允许运行一个在MATLAB的APP DESIGNER中创建的应用实例?

[英]How can I allow only one instance of app to run which created in APP DESIGNER of MATLAB?

I created application in app designer of matlab and install it in apps. 我在matlab的应用设计器中创建了应用,并将其安装在应用中。 I can run one or more instance this apps but I need only one. 我可以运行一个或多个实例此应用,但我只需要一个。 For example in "GUIDE" of matlab is option: "GUI allows only one instance to run (singleton)" 例如,在matlab的“ GUIDE”中有一个选项:“ GUI仅允许运行一个实例(单例)”

If you check the code GUIDE generates you will find out that it uses global application data for keeping count of application instances. 如果检查了GUIDE生成的代码,您会发现它使用全局应用程序数据来保留应用程序实例的数量。 So you could implement something similar with setappdata(0, ...) and getappdata(0, ...) . 因此,您可以使用setappdata(0, ...)getappdata(0, ...)实现类似的setappdata(0, ...)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 App Designer 中停止我的网络摄像头循环? Matlab - How can I stop my webcam loop in App Designer? Matlab 如何在 Matlab 应用程序设计器中使用 Excel? - How can I use Excel in Matlab App designer? MATLAB App Designer 应用程序能否启动保存数字的脚本? - Can a MATLAB App Designer app launch a script which saves figures? 如何在 Matlab 的应用程序设计器应用程序中显示具有另一个表作为变量的表? - How do I display a table which has another table as a variable in app designer app in Matlab? 我可以在 MATLAB App Designer 中包含一个词干 plot - Can I include a stem plot in MATLAB App Designer 如何使用Matlab App Designer显示数据/信息? - How do I display data/information with Matlab App Designer? 如何在MATLAB的应用程序设计器中使用'waitfor'或'uiwait'? - How use 'waitfor' or 'uiwait' in app designer of MATLAB? 如何在 matlab gui 中将数据从一个应用程序传递到另一个应用程序(使用应用程序设计器) - how to pass data from one app to another in matlab gui (using app designer) 如何将Picturebox添加到Matlab App Designer? - How to add picturebox to Matlab App Designer? 无法在 App Designer MATLAB 下同时运行两个函数 - Unable to run two function simultanously under App Designer MATLAB
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM