Import additional code/functionality into running executable

2 visualizaciones (últimos 30 días)
If I have an executable running with some standard functionality, and I want to implement some additional functionality on a case by case basis, without directly adding it into the existing code, would that be possible?
Say I had a GUI/executable, I was envisioning a button in the main GUI to load an "add-on" function. I guess I could have the main GUI call an add-on GUI (and associated code), and worry about passing information between them, however that might not be the most elegant way.
I was also thinking of implementing a sort of tabbed structure with buttons and uipanels, and having the main functionality on the first panel, then trying to load the add-on, if required, into a second uipanel, however, I don't know if it's possible to load a GUI within a GUI.
Any thoughts on this?

Respuesta aceptada

Image Analyst
Image Analyst el 5 de Sept. de 2013
Sure. Just make functions. They could be in the same m-file, or in separate ones. At the appropriate time, just call the appropriate function. Look up functions in the help. Yes, you can have panels and make them visible or invisible but that doesn't really change the code - it just changes whether it's possible to call the code or not depending on whether you see that panel or not, but the code will still be in there regardless of whether your panel is visible or not.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by