'String','Button 1' add the label, Button 1 to the push button.
'Position',[50 20 60 40] specifies the location and size of the push button. In this
example, the push button is 60 pixels wide and 40 high. It is positioned 50 pixels from the
left of the figure and 20 pixels from the bottom.
Displaying an Icon on a Push Button
To add an icon to a push button, assign the button's CData property to be an m-by-n-by-3
array of RGB values that define a truecolor image.
Radio Button
This code creates a radio button:
f = figure;
r = uicontrol(f,'Style','radiobutton',...
'String','Indent nested functions.',...
'Value',1,'Position',[30 20 150 20]);
The first uicontrol argument, f, specifies the parent container. In this case, the parent
is a figure, but you can also specify the parent to be any container, such as a panel or
button group. If you have multiple radio buttons, you can manage their selection by
specifying the parent to be a button group. See “Button Groups” on page 9-18 for more
information.
The name-value pair arguments, 'Style','radiobutton' specifies the uicontrol to a
radio button.
'String','Indent nested functions.' specifies a label for the radio button.
Add Components to a Programmatic App