


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).
Usage: b = ltpda_tfe(a1,a2,a3,...,pl)
b - output analysis objects
aN - input analysis objects (at least two)
pl - input parameter list
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]
The following call returns a parameter list object that contains the
default parameter values:
>> pl = ltpda_tfe('Params')
M Hewitson 07-02-07


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