function simloadsys
global HANDLES pathname sys

[filename,pathname,error]=loadfile(1,pathname);
if error==0
   eval(['load ',pathname,filename])
end

if isfield(sys,'m')
   set(HANDLES.hmmenu{20}(1),'enable','on');
   if isfield(sys,'input')
      set(HANDLES.hmmenu{20}(3),'enable','on');
      set(HANDLES.hmmenu{20}(4),'enable','on');
      if isfield(sys,'output')
         set(HANDLES.hmmenu{21}(1),'enable','on');
      end
   end
end
