Programming a MATLAB plugin

3 次查看(过去 30 天)
med-sweng
med-sweng 2014-4-11
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.

回答(2 个)

Walter Roberson
Walter Roberson 2014-4-11
MATLAB does not offer "plugins", at least not under that name.
You can program MEX files; see
  2 个评论
med-sweng
med-sweng 2014-4-11
@Walter. Thanks for your reply. I mean say that you built a GUI program using MATLAB, and you want to add MATLAB features to the program, can you do that? Can it be included like a plugin if plugins are not offered in MATLAB?
Walter Roberson
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
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.

类别

Help CenterFile Exchange 中查找有关 Extend Testing Frameworks 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by