Home > classes > @ao > tfe.m

tfe

PURPOSE ^

TFE makes transfer function estimates of the time-series objects.

SYNOPSIS ^

function varargout = tfe(varargin)

DESCRIPTION ^

 TFE makes transfer function estimates of the time-series objects.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: 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 = 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

 M-FILE INFO: Get information about this methods by calling
              >> ao.getInfo('tfe')

              Get information about a specified set-plist by calling:
              >> ao.getInfo('tfe', 'None')

 VERSION:     $Id: tfe.m,v 1.6 2008/09/05 11:05:29 ingo Exp $

 HISTORY:     07-02-2007 M Hewitson
                 Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % TFE makes transfer function estimates of the time-series objects.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: TFE makes transfer function estimates of the time-series
0005 %              objects in the input analysis objects. Transfer functions are
0006 %              computed using MATLAB's tfestimate (>> help tfestimate).
0007 %
0008 % CALL:        b = tfe(a1,a2,a3,...,pl)
0009 %
0010 % INPUTS:      b    - output analysis objects
0011 %              aN   - input analysis objects (at least two)
0012 %              pl   - input parameter list
0013 %
0014 % OUTPUTS:     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.
0018 %              The following parameters are recognised.
0019 %
0020 % PARAMETERS: 'Win'   - a specwin window object [default: Kaiser -200dB psll]
0021 %             'Olap'  - segment percent overlap [default: taken from window function]
0022 %             'Nfft'  - number of samples in each fft [default: length of input data]
0023 %              Order - order of detrending:
0024 %                      -1 - no detrending
0025 %                       0 - subtract mean [default]
0026 %                       1 - subtract linear fit
0027 %                       N - subtract fit of polynomial, order N
0028 %
0029 % M-FILE INFO: Get information about this methods by calling
0030 %              >> ao.getInfo('tfe')
0031 %
0032 %              Get information about a specified set-plist by calling:
0033 %              >> ao.getInfo('tfe', 'None')
0034 %
0035 % VERSION:     $Id: tfe.m,v 1.6 2008/09/05 11:05:29 ingo Exp $
0036 %
0037 % HISTORY:     07-02-2007 M Hewitson
0038 %                 Creation
0039 %
0040 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0041 
0042 function varargout = tfe(varargin)
0043 
0044   % Check if this is a call for parameters
0045   if utils.helper.isinfocall(varargin{:})
0046     varargout{1} = getInfo(varargin{3});
0047     return
0048   end
0049 
0050   import utils.const.*
0051   utils.helper.msg(msg.MNAME, 'running %s/%s', mfilename('class'), mfilename);
0052   
0053   % Collect input variable names
0054   in_names = cell(size(varargin));
0055   for ii = 1:nargin,in_names{ii} = inputname(ii);end
0056 
0057   % Collect all AOs and plists
0058   [as, ao_invars] = utils.helper.collect_objects(varargin(:), 'ao', in_names);
0059   pl              = utils.helper.collect_objects(varargin(:), 'plist', in_names);
0060 
0061   % combine plists
0062   pl = combine(pl, getDefaultPlist());
0063 
0064   varargout{1} = ao.xspec(as, pl, 'tfe', getInfo, ao_invars);
0065 end
0066 
0067 %--------------------------------------------------------------------------
0068 % Get Info Object
0069 %--------------------------------------------------------------------------
0070 function ii = getInfo(varargin)
0071   if nargin == 1 && strcmpi(varargin{1}, 'None')
0072     sets = {};
0073     pl   = [];
0074   else
0075     sets = {'Default'};
0076     pl   = getDefaultPlist;
0077   end
0078   % Build info object
0079   ii = minfo(mfilename, 'ao', '', utils.const.categories.sigproc, '$Id: tfe.m,v 1.6 2008/09/05 11:05:29 ingo Exp $', sets, pl);
0080 end
0081 
0082 %--------------------------------------------------------------------------
0083 % Get Default Plist
0084 %--------------------------------------------------------------------------
0085 function pl = getDefaultPlist()
0086   pl = plist('Nfft', -1, ...
0087     'Win', getappdata(0, 'ltpda_default_spectral_window'), ...
0088     'Olap', -1, ...
0089     'Order', 0);
0090 end
0091 
0092 % END
0093

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003