Programming a MATLAB plugin

4 visualizzazioni (ultimi 30 giorni)
med-sweng
med-sweng il 11 Apr 2014
Commentato: Walter Roberson il 12 Apr 2014
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.

Risposte (2)

Walter Roberson
Walter Roberson il 11 Apr 2014
MATLAB does not offer "plugins", at least not under that name.
You can program MEX files; see
  2 Commenti
med-sweng
med-sweng il 11 Apr 2014
@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 il 12 Apr 2014
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?

Accedi per commentare.


per isakson
per isakson il 12 Apr 2014
Modificato: per isakson il 12 Apr 2014
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.

Categorie

Scopri di più su Dates and Time in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by