%
%  Name:   loaddata
%
%  Usage:  loaddata
%
%  Loads the datafile variables into their proper variablenames
%

%  Version SWD970401
%
%  Author(s): Scott W. Doebling, doebling@lanl.gov
%
%  Institution: Los Alamos National Laboratory,
%               ESA-EA
%
%  Copyright (c) 1996-1997, The Regents of the University
%       of California. (See top level of code for
%       full copyright statement.)


eval(['load ',[pathname,filename]]);

if exist('filename') == 1,

   eval([' filename',num2str(nds),' = filename;'])

   clear filename

end


if exist('G')==1,

 
  eval([' G',num2str(nds),' = G;'])
  
  clear G

end

if exist('Coh') == 1,

      eval([' Coh',num2str(nds),' = Coh;'])
      clear Coh

end


if exist('Gxy'),

  eval([' Gxy',num2str(nds),' = Gxy;'])
   clear Gxy

end

if exist('Gxx') == 1,

      eval([' Gxx',num2str(nds),' = Gxx;'])
      clear Gxx

end

if exist('Gyy') == 1,

      eval([' Gyy',num2str(nds),' = Gyy;'])
      clear Gyy

end
   
if exist('navg') == 1,

      eval([' navg',num2str(nds),' = navg;'])
      clear navg

end


if exist('nfunc') ~= 1,

       nfunc = 1;
       set(h4(1:5),'checked','off')
       set(h4(1),'checked','on')
   
end

assignG

set(hmmenu(4:5),'enable','on')
