How to build a GUI from a m-file?

27 views (last 30 days)
johnmay
johnmay on 22 Oct 2015
Answered: TastyPastry on 22 Oct 2015
Hi guys,
Im new with GUI on Matlab and it would be very nice if someone could help just a little bit !
I currently have a m-file that will be used for signal post-processing. This m-files includes parameters such as sampling frequency, frequency span and many others... All these parameters have to be edited by the user before running the m-file. While running, the m-file executes some operations like importing data, plotting, filtering... But these operations have been directly programmed in the m-file, there are no functions.
As I wanted to make this code more user friendly, I would like to implant a GUI so as the code would be more easy to use. The GUI would let the user set the parameters (such as frequency span...) and compile parts of the m-file while clicking buttons (for exemple, the button "Import data" will run the m-file coressponding lines
How should I do that the easiest way as possible? How would you do?

Answers (1)

TastyPastry
TastyPastry on 22 Oct 2015
You can try using GUIDE (type "guide" into the command window). I prefer writing my own GUIs from scratch because I'm not a fan of how GUIDE organizes things. If you've never made a GUI before, I'd recommend GUIDE, it's fairly easy to use and understand. You can create a GUI which has buttons with callbacks to run your .m files.

Categories

Find more on Migrate GUIDE Apps 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!