AIM: Study and Implementation of Toggle button, Radio button and
Checkbox in MATLAB GUI.
PROCEDURE:
1. For
opening GUI tool simply type following command in command window.
>> guide
|
Fig: 1
GUI menu bar with List box
2. In
second step simply click over List box as mentioned in fig 1. Drag that List
box in empty space as mentioned in fig 2.
Fig: 2
GUI with List box
3.
Next step is to change the properties of the List box. For this just double
click on List box this action will open property inspector. Property inspector
consists of various properties. You have to change background color if
necessary, font size, font weight, remember tag of the Toggle button, Radio
button and Checkbox or keep tag as it is, you have to change the string of the list
box as mentioned in fig 3.
Fig: 3
Property Inspector of List box
4. Our
aim is to Add, Subtract, Multiply, Divide and Average of the two numbers. For
this we require two edit boxes one list box and one static text as shown in fig
4.
Fig: 4
Final fig file with List box, Edit boxes and Static text
4.
Next thing is to right click on List box and open callback, write linking code
there to make a connection between List box, edit boxes and static text as
shown in fig 5.
Fig: 5
m file with linking code of List box.
5. Finally
fig 6, fig 7 & fig 8 shows you final Output of the GUI with List box.
Fig: 6
final fig file with Subtraction process
Fig: 7
final fig file with Division process
Fig: 8
final fig file with choose action as an option
No comments:
Post a comment