function h = selecttab(h,tab)
%SELECTTAB  Switch 'h.EditorFrame' to tab number 'tab'

%   Author(s): A. DiVergilio
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.2 $  $Date: 2000/06/14 20:15:48 $

if ~isempty(h.EditorFrame)
  s = get(h.EditorFrame,'UserData');
  tab = max(1,min(tab,3))-1;
  s.TabPanel.selectPanel(tab);
end
