Steps required to create GUI in MATLAB
How GUI is created in MATLAB software? When you will open your MATLAB software the window will open. Now in open the GUI in toolbar you have to write guide in work space. How to create GUI in MATLAB? The following steps are followed for creating GUI in MATLAB:
- Hit enter and anew window will open. From here we will start creating our GUI.
- In the small window there are two tabs. One is create new GUI and the second tab is open existing GUI as you know we open first we create new GUI.
- Then press OK button and a new window will open.
- This is the place where we gonna create GUI. In the left of the window there is a toolbar showing the control which we drag and control in the main window and will design the GUI.
- First we select the button and then we will select Edit text bar and static text bar and we will make the arrangement in such a way that we press the button then data will move from Edit text box to Static text box.
- Now click on the button icon and the next thing will open on the window.
- Now if you want to change the properties of the button and if you want to change its name or settings then double click the button and a new window will open.
- In the new window there were a large no. of options.
- To change the name of push button go to string option and here you can change the name.
- Now click on the play icon in the top of the toolbar which is use to run the GUI. After doing that a new window will open.
- In the new window it is the back end programming of GUI created automatically by MATLAB. Now we want to add a text box and we will select it from toolbar.
- Now we want to write some address or a website and when I will press OK button on our GUI window. In the same manner we will select Edit text box.
- Now by doing all this I want to write some data in Edit text box when I will press the start button data will move from Edit text box to Static text box. We need to load a function code in start button right click the start button and a new window will open If we click on the View Call Back and next window will open in which we will click on the call back button.
- Now the code has been uploaded and the very next window will be open ,will be of Edit text box. Here we can write anything which we want to display in Static text box.
- Now in this window we will add our Tutorial Titles. When we will press enter immediately an other button will open which representing our data will move Static text box.
- As you have seen that our Final display is same which means we have move data from Edit textbox to Static text box.
The code added in button call back is as follow ;
X= get(handles.edit1,’String’); %edit1 being Tag of ur edit box
if isempty(x) fprintf(‘Error: Enter Text firstn’);
else set(handles.text2,’String’,x) end
Introduction to GUI
GUI is an interface that helps users to interact with different electronic devices using icons and with the help of other visual indicators. The reason GUI were created because command interfaces were not too easy for user to understand it properly.
In this growing world Graphical user interfaces are used in many devices such as Gaming devices, smartphones etc.
ELEMENTS IN GUI
Elements that are present in the Graphical User Interface will show us about the appearance of GUI. Some of them are given below :-
Window is the element that displays the information on the screen. We can easily handle this by clicking on the icon at once. User can also drag the screen wherever he want. One of the advantage of this is that we can open different windows that are performing different tasks at the same time.
There are also different types of windows in GUI like; text terminal window, child window, message window etc.
A menu provides us the list of choices for user to select them whom they want to open. A bar that is displayed horizontally across the screen is known as a Menu Bar. Whenever any option is clicked in tis menu then a pull down menu appears.
When the user performing any specific action the bar that appears that time is known as a Context Menu.
Files/programs/web pages can be presented using a small pics in a GUI. This Picture as known as a ICON. This element help the user to open the documents and run them easily and in a very short time.
This element helpful for the user to read the information directly. It’s also known as widgets. Use of widgets is that they can display the items that are similar and widgets also navigate the system by using different links and tabs. It can also use check boxes for manipulating data.
A Tab is linked with a view pane, it consists of a text label and a icon of graphics. Tabs are related with the widgets and also multiple tabs help the user to switch b/w various kinds of widgets. Use of tabs are in different web search engines like; internet explorer, safari etc. By using tabs we can open different web pages in a web browser and the user can easily switch them.
Graphical user interface allow the user to interact in a meaningful way by avoiding confusion. Its looks very fascinating and multi- colored. One of the big advantage is that it gives full screen interaction to the user on anywhere on the screen.
Matlab GUI Tutorial – Pop-up Menu
In this Matlab GUI instructional exercise, you will figure out how to make and go through the Pop Menu component. Spring up menus are utilized as a control for picking between a bunch of alternatives. up menus are utilized as a control for picking between a bunch of alternatives. At the point when the client taps on the Pop-up menu, the menu extends, uncovering a bunch of decisions that the client can pick. A typical use for Pop-up menus is a text dimension selector
1. For the viper GUI, we will require the accompanying segments Add an Edit t Edit Text part t th GUI fi t to the GUI figure. Add a Pop-up Menu part onto the GUI figure.
Double tap the Static Text part to raise the Property Inspector. Change the String property to testing and
change the Tag property to testing
staticText as demonstrated in the figure underneath:
For complete detail download file
Also read here: