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] 'Olap' - segment percent overlap [default: taken from window function] 'Nfft' - number of samples in each fft [default: length of input data] Order - order of detrending: -1 - no detrending 0 - subtract mean [default] 1 - subtract linear fit N - subtract fit of polynomial, order N VERSION: $Id: ltpda_tfe.m,v 1.16 2008/03/30 23:33:26 mauro 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') The following call returns a string that contains the routine CVS version: >> version = ltpda_tfe('Version') The following call returns a string that contains the routine category: >> category = ltpda_tfe('Category') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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 % 'Olap' - segment percent overlap [default: taken from window function] 0024 % 'Nfft' - number of samples in each fft [default: length of input data] 0025 % Order - order of detrending: 0026 % -1 - no detrending 0027 % 0 - subtract mean [default] 0028 % 1 - subtract linear fit 0029 % N - subtract fit of polynomial, order N 0030 % 0031 % VERSION: $Id: ltpda_tfe.m,v 1.16 2008/03/30 23:33:26 mauro Exp $ 0032 % 0033 % HISTORY: 07-02-2007 M Hewitson 0034 % Creation 0035 % 0036 % The following call returns a parameter list object that contains the 0037 % default parameter values: 0038 % 0039 % >> pl = ltpda_tfe('Params') 0040 % 0041 % The following call returns a string that contains the routine CVS version: 0042 % 0043 % >> version = ltpda_tfe('Version') 0044 % 0045 % The following call returns a string that contains the routine category: 0046 % 0047 % >> category = ltpda_tfe('Category') 0048 % 0049 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0050 0051 ALGONAME = mfilename; 0052 VERSION = '$Id: ltpda_tfe.m,v 1.16 2008/03/30 23:33:26 mauro Exp $'; 0053 CATEGORY = 'Signal Processing'; 0054 0055 0056 %% Check if this is a call for parameters, the CVS version string 0057 % or the function category 0058 if nargin == 1 && ischar(varargin{1}) 0059 in = char(varargin{1}); 0060 if strcmp(in, 'Params') 0061 varargout{1} = getDefaultPL(); 0062 return 0063 elseif strcmp(in, 'Version') 0064 varargout{1} = VERSION; 0065 return 0066 elseif strcmp(in, 'Category') 0067 varargout{1} = CATEGORY; 0068 return 0069 end 0070 end 0071 0072 % capture input variable names 0073 invars = {}; 0074 as = []; 0075 ps = []; 0076 for j=1:nargin 0077 invars = [invars cellstr(inputname(j))]; 0078 if isa(varargin{j}, 'ao') 0079 as = [as varargin{j}]; 0080 end 0081 if isa(varargin{j}, 'plist') 0082 ps = [ps varargin{j}]; 0083 end 0084 end 0085 0086 0087 % check plist 0088 if isempty(ps) 0089 pl = getDefaultPL(); 0090 else 0091 pl = combine(ps, getDefaultPL); 0092 end 0093 0094 varargout{1} = ltpda_xspec(as, pl, 'TF', ALGONAME, VERSION, invars); 0095 0096 0097 0098 0099 0100 %-------------------------------------------------------------------------- 0101 % Get default params 0102 function plo = getDefaultPL() 0103 0104 disp('* creating default plist...'); 0105 plo = plist('Nfft', -1, ... 0106 'Win', specwin('Kaiser', 1, 100),... 0107 'Olap', -1, ... 0108 'Order', 0); 0109 0110 disp('* done.'); 0111