GUIs Graphical User Interfaces provide the users a rich and hassle free environment for viewing, manipulating or running their programs.
GUIs MATLAB provides a useful tool called ‘GUIDE’ for building Graphical User Interfaces. GUIDE stands for GUI Design Environment. It can be initiated by the command: >>guide
GUIDE The main window of ‘GUIDE’ looks like this: You can visit the HELP and documentation section for sample codes and examples!
GUIDE This is the first window of GUIDE. It allows you to select the prototype of the graphical user interface.
GUIDE After selecting the first option you’ll come to this window. This is our GUI editor.
GUIDE Adding 3 push buttons and an ‘axes’ area.
GUIDE Use the ‘align’ option from ‘Tools’ to align the three pus buttons.
GUIDE The toolbar option allows you to design your custom toolbar.
GUIDE Save your work by pressing ‘ctrl+s’ or select ‘save’ from the ‘File’ menu.
GUIDE Run the GUI from the ‘Run Figure’ option.
GUIDE This is what we have built till now.
GUIDE Now, lets write a code that opens an image when the first button is pressed. Search for ‘pushbutton1_Callback(…)’ line and write the following code in your figure’s m file: (img.bmp is the image that will open when this button is pressed)
GUIDE Now save the m file and run the figure. Now press the first pushbutton!
GUIDE This was a simple example of implementing a GUI using the matlab tool GUIDE.
Visit more self help tutorials Pick a tutorial of your choice and browse through it at your own pace. The tutorials section is free, self-guiding and will not involve any additional support. Visit us at www.dataminingtools.net