How can I use code in a GUI without launching it?
Show older comments
I am still relatively new to matlab in particular when it comes to working with GUI's. I have taken a fair amount of programming in C++, so other than the syntax at some points matlab has been good to me.
Currently, I am trying to automate a series of GUI's that are used to process data. I have done so with one gui that seemed more or less coded manually. I simply had a driver script create the necessary structure, and passed that into the GUI code with varargin. It would use an "if" to test for input. If nothing was passed in it would launch the GUI like normal, otherwise it would only call the "run" portion of the code that operates on the structure.
My main question is, whats the best way to modify a gui that has been made with "guide" to be a blackbox only? I have attempted to make sense of whats going on in gui_mainfcn.m but hardly understand it. But more importantly have made little progress in determining the best way to use a "guide" produced gui as a "blackbox" called by other scripts.
I am hoping there may be a clean way to do this, but please let me know of any realities I am over looking. Many thanks in advanced.
3 Comments
Rik
on 2 Nov 2018
Why would you use the gui code for that? It sounds like you have a function that is natively called by your gui and can also be called by using your gui as a wrapper. Why make it more complex than it needs to be? (also, I dislike GUIDE)
Chase Ward
on 2 Nov 2018
Edited: per isakson
on 3 Nov 2018
per isakson
on 3 Nov 2018
Another link
Answers (0)
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!