How to build a GUI from a m-file?

27 ビュー (過去 30 日間)
johnmay
johnmay 2015 年 10 月 22 日
回答済み: TastyPastry 2015 年 10 月 22 日
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?

回答 (1 件)

TastyPastry
TastyPastry 2015 年 10 月 22 日
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.

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by