function test_button_group1
fig = figure;
pos = get(gcf,'Position');
pos(3) = 300;
pos(4) = 200;
set(gcf,'Position',pos,'NumberTitle','off','MenuBar','none', ...
    'Name','Test Button Group','ToolBar','none');
h = uibuttongroup('visible','off','Position',[0.1 0.1 0.8 0.8],...
    'Title','Button Group');
u0 = uicontrol('Style','Radio','String','Option 1',...
    'Units','normalized', ...
    'pos',[0.1 0.7 0.8 0.1],'parent',h,'HandleVisibility','off');
u1 = uicontrol('Style','Radio','String','Option 2',...
    'Units','normalized', ...
    'pos',[0.1 0.4 0.8 0.1],'parent',h,'HandleVisibility','off');
u2 = uicontrol('Style','Radio','String','Option 3',...
    'Units','normalized', ...
    'pos',[0.1 0.1 0.8 0.1],'parent',h,'HandleVisibility','off');
set(h,'SelectionChangeFcn',@selcbk);
set(h,'SelectedObject',[]);  % No selection
set(h,'Visible','on');
end

function selcbk(source,eventdata)
disp(source);
disp([eventdata.EventName,'  ',... 
     get(eventdata.OldValue,'String'),'  ', ...
     get(eventdata.NewValue,'String')]);
disp(get(get(source,'SelectedObject'),'String'));
end
