%
%  Name: savedata
% 
%  Usage: savedata
% 
%   Description:
%     Saves data variables to specified file

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

disp('Saving Data...')

savestr = '';

if exist('G') == 1,
   savestr = [savestr,' G '];
end

if exist('Coh')==1,
   savestr = [savestr,' Coh'];
end

if exist('Gxy')==1,
   savestr = [savestr,' Gxy '];
end

if exist('Gxx')==1,
   savestr = [savestr,' Gxx '];
end

if exist('Gyy')==1,
   savestr = [savestr,' Gyy '];
end

if exist('navg')==1,
   savestr = [savestr,' navg '];
end

if exist('cf')==1,
   savestr = [savestr,' cf '];
end

if exist('nlines')==1,
   savestr = [savestr,' nlines '];
end

if exist('sp')==1,
   savestr = [savestr,' sp '];
end

if exist('test_type')==1,
   savestr = [savestr,' test_type '];
end

if exist('domain')==1,
   savestr = [savestr,' domain '];
end

if exist('refDOF')==1,
   savestr = [savestr,' refDOF '];
end

if exist('respDOF')==1,
   savestr = [savestr,' respDOF '];
end

if exist('t0')==1,
   savestr = [savestr,' t0 '];
end

if exist('t1')==1,
   savestr = [savestr,' t1 '];
end

eval(['save ',pathname,filename,savestr]);

disp('Done Saving Data')


