Home > m > sigproc > frequency_domain > ltpda_cohere.m

ltpda_cohere

PURPOSE ^

LTPDA_COHERE makes coherence estimates of the time-series objects

SYNOPSIS ^

function varargout = ltpda_cohere(varargin)

DESCRIPTION ^

 LTPDA_COHERE makes coherence estimates of the time-series objects

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

 DESCRIPTION: LTPDA_COHERE makes coherence estimates of the time-series objects
              in the input analysis objects. Coherences are computed using
              MATLAB's mscohere (>> help mscohere).

 CALL:        b = ltpda_cohere(a1,a2,a3,...,pl)

 INPUTS:      b    - output analysis objects
              aN   - input analysis objects (at least two)
              pl   - input parameter list

              The function makes coherence estimates between a1 and all other
              input AOs. Therefore, if the input argument list contains N
              analysis objects, the output, b, will contain N-1 coherence estimates.

              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_cohere.m,v 1.8 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_cohere('Params')

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

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

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003