function set_menu(num,state,item)

% function set_menu(num,state,item)
%
% This function is used in conjunction with FD3.  If this function is called
% with two argument, it sets the 'Enable' property of FD3MENUS(num) to
% 'state'.  If this function is called with three aruments, it sets the
% 'Enable' property of child number 'item' of FD3MENUS(num) to 'state'.
% The last item created on FD3MENUS(num) is 'item' one, the second-to-last
% item created on FD3MENUS(num) is 'item' two, etc.
%
% ACP

% Last update:  July 7, 1993
% Author:       Adrian C. Penisson

global FD3MENUS

if nargin==2
   set(FD3MENUS(num),'Enable',state);
elseif nargin==3
   child=get(FD3MENUS(num),'Children');
   set(child(item),'Enable',state);
end

