function uibuttongroup_plate(hObject,eventdata)
global h var
switch get(eventdata.NewValue,'Tag') % Get Tag of selected object.
    case 'plate1'
        var.p=1;
    case 'plate2'
      var.p=2;
    
%     otherwise
%         % Code for when there is no match.
end




