Programming a MATLAB plugin
2 次查看(过去 30 天)
显示 更早的评论
I couldn't find a clear reference on that. I just want to ask, if I want to learn how to program plugins in MATLAB, where is a good start for that?
Thanks.
0 个评论
回答(2 个)
Walter Roberson
2014-4-11
MATLAB does not offer "plugins", at least not under that name.
You can program MEX files; see
2 个评论
Walter Roberson
2014-4-12
You need a standard about where the plugin modules need to go in order to be automatically known to the program. You need a standard for initializing what-ever the plugin needs initialized. You need a protocol to call into the plugin to activate a particular function //OR// you need a standard list of functions whose handles are to be returned by the initialization of the plugin. You might want some method for retrieving decorative names for the standard plugin calls. You might want to add a per-plugin menu.
And then you just have the menu item callback call the appropriate routine with whatever arguments were standardized for the API. You are calling into MATLAB code so the "plugin" you write could go as far as fetching the names of all of the figures and chasing down through them to find particular axes, or the like.
Your next challenge: having a plug-in create information for another routine that it does not call. For example if it creates a filtered image that should become the new "current" image, then how should the other routines know?
per isakson
2014-4-12
编辑:per isakson
2014-4-12
I know plugins from using various open source programs, e.g. notepad++. I see plugins as a mechanism for cooperation in the open source world. The MathWorks is not keen on third party plugins.
My answer to your question is yes - or no.
AFAIK: there is no published conventions, which tell you how to make a "plugin" so that it could be "installed" and automatically shows up in a drop-down menu of the menu-bar. Thus in a strict sense there is no support for plugins.
.
add MATLAB features to the program [you built a GUI program]. Yes! To get an useful answer you might need to rephrase your question.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!