LTPDA_TFE makes transfer function estimates of the time-series objects. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: LTPDA_TFE makes transfer function estimates of the time-series objects in the input analysis objects. Transfer functions are computed using MATLAB's tfestimate (>> help tfestimate). CALL: b = ltpda_tfe(a1,a2,a3,...,pl) INPUTS: b - output analysis objects aN - input analysis objects (at least two) pl - input parameter list OUTPUTS: The output matrix b contains NxN transfer functions estimates (all possible pairs of input AOs). If the last input argument is a parameter list (plist) it is used. The following parameters are recognised. PARAMETERS: 'Win' - a specwin window object [default: Kaiser -200dB psll] 'Nolap' - segment overlap (number of samples) [default: taken from window function] 'Nfft' - number of samples in each fft [default: fs of input data] VERSION: $Id: ltpda_tfe.m,v 1.14 2007/07/16 12:52:21 ingo Exp $ HISTORY: 07-02-2007 M Hewitson Creation The following call returns a parameter list object that contains the default parameter values: >> pl = ltpda_tfe('Params') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function varargout = ltpda_tfe(varargin) 0002 % LTPDA_TFE makes transfer function estimates of the time-series objects. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: LTPDA_TFE makes transfer function estimates of the time-series 0007 % objects in the input analysis objects. Transfer functions are 0008 % computed using MATLAB's tfestimate (>> help tfestimate). 0009 % 0010 % CALL: b = ltpda_tfe(a1,a2,a3,...,pl) 0011 % 0012 % INPUTS: b - output analysis objects 0013 % aN - input analysis objects (at least two) 0014 % pl - input parameter list 0015 % 0016 % OUTPUTS: The output matrix b contains NxN transfer functions estimates (all 0017 % possible pairs of input AOs). 0018 % 0019 % If the last input argument is a parameter list (plist) it is used. 0020 % The following parameters are recognised. 0021 % 0022 % PARAMETERS: 'Win' - a specwin window object [default: Kaiser -200dB psll] 0023 % 'Nolap' - segment overlap (number of samples) [default: taken from window function] 0024 % 'Nfft' - number of samples in each fft [default: fs of input data] 0025 % 0026 % VERSION: $Id: ltpda_tfe.m,v 1.14 2007/07/16 12:52:21 ingo Exp $ 0027 % 0028 % HISTORY: 07-02-2007 M Hewitson 0029 % Creation 0030 % 0031 % The following call returns a parameter list object that contains the 0032 % default parameter values: 0033 % 0034 % >> pl = ltpda_tfe('Params') 0035 % 0036 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0037 0038 ALGONAME = mfilename; 0039 VERSION = '$Id: ltpda_tfe.m,v 1.14 2007/07/16 12:52:21 ingo Exp $'; 0040 0041 % Check if this is a call for parameters 0042 if nargin == 1 0043 in = char(varargin{1}); 0044 if strcmp(in, 'Params') 0045 varargout{1} = getDefaultPL(); 0046 return 0047 end 0048 end 0049 0050 % capture input variable names 0051 invars = {}; 0052 as = []; 0053 ps = []; 0054 for j=1:nargin 0055 invars = [invars cellstr(inputname(j))]; 0056 if isa(varargin{j}, 'ao') 0057 as = [as varargin{j}]; 0058 end 0059 if isa(varargin{j}, 'plist') 0060 ps = [ps varargin{j}]; 0061 end 0062 end 0063 0064 0065 % check plist 0066 if isempty(ps) 0067 pl = getDefaultPL(); 0068 else 0069 pl = combine(ps, getDefaultPL); 0070 end 0071 0072 varargout{1} = ltpda_xspec(as, pl, 'TF', ALGONAME, VERSION, invars); 0073 0074 0075 0076 0077 0078 %-------------------------------------------------------------------------- 0079 % Get default params 0080 function plo = getDefaultPL() 0081 0082 disp('* creating default plist...'); 0083 plo = plist(); 0084 plo = append(plo, param('Nfft', -1)); 0085 plo = append(plo, param('Win', specwin('Kaiser', 1, 100))); 0086 plo = append(plo, param('Nolap', -1)); 0087 disp('* done.'); 0088