%
%  Name:   assignG
%
%  Usage:  assignG
%
%  Assigns the proper variable to the function G for the dataplot routines 
%

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

% nds  = Variable setting which data set (primary or secondary)
% nfunc = Variable setting which function (1 = FRF, 2 = COH, 3 = CPS, 4 = PSD)


if nfunc == 1,

      fstr = 'G';

elseif nfunc ==2,

      fstr = 'Coh';

elseif nfunc == 3,

      fstr = 'Gxy';

elseif nfunc == 4,

      fstr = 'Gyy';

elseif nfunc == 5,

      iresp=1;
      iref=1;
	set(hplttl(18),'string',num2str(iresp))
	set(hplttl(20),'string',num2str(iref))
      fstr = 'Gxx';

end


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