LTPDA_XCORR makes cross-correlation estimates of the time-series %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: LTPDA_XCORR makes cross-correlation estimates of the time-series objects in the input analysis objects. The cross-correlation is computed using MATLAB's xcorr (>> help xcorr). CALL: b = ltpda_xcorr(a1,a2,a3,...,pl) INPUTS: b - output analysis objects aN - input analysis objects (at least two) pl - input parameter list The function makes correlation estimates between a1 and all other input AOs. Therefore, if the input argument list contains N analysis objects, the output a will contain N-1 CPSD estimates. If only on AO is input, the auto-correlation is computed. If the last input argument is a parameter list (plist) it is used. The following parameters are recognised. PARAMETERS: 'MaxLag' - compute over range of lags -MaxLag to MaxLag [default: M-1] 'Scale' - normalisation of the correlation. Choose from: 'biased' - scales the raw cross-correlation by 1/M. 'unbiased' - scales the raw correlation by 1/(M-abs(lags)). 'coeff' - normalizes the sequence so that the auto-correlations at zero lag are identically 1.0. 'none' - no scaling (this is the default). M is the length of longest input vector. If one vector is shorted, it is zero padded. VERSION: $Id: ltpda_xcorr.m,v 1.7 2008/08/11 10:01:08 hewitson Exp $ HISTORY: 07-02-2007 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 % LTPDA_XCORR makes cross-correlation estimates of the time-series 0002 % 0003 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0004 % 0005 % DESCRIPTION: LTPDA_XCORR makes cross-correlation estimates of the time-series 0006 % objects in the input analysis objects. The cross-correlation is 0007 % computed using MATLAB's xcorr (>> help xcorr). 0008 % 0009 % CALL: b = ltpda_xcorr(a1,a2,a3,...,pl) 0010 % 0011 % INPUTS: b - output analysis objects 0012 % aN - input analysis objects (at least two) 0013 % pl - input parameter list 0014 % 0015 % The function makes correlation estimates between a1 and all other 0016 % input AOs. Therefore, if the input argument list contains N analysis 0017 % objects, the output a will contain N-1 CPSD estimates. 0018 % 0019 % If only on AO is input, the auto-correlation is computed. 0020 % 0021 % If the last input argument is a parameter list (plist) it is used. 0022 % The following parameters are recognised. 0023 % 0024 % PARAMETERS: 'MaxLag' - compute over range of lags -MaxLag to MaxLag [default: M-1] 0025 % 'Scale' - normalisation of the correlation. Choose from: 0026 % 'biased' - scales the raw cross-correlation by 1/M. 0027 % 'unbiased' - scales the raw correlation by 1/(M-abs(lags)). 0028 % 'coeff' - normalizes the sequence so that the auto-correlations 0029 % at zero lag are identically 1.0. 0030 % 'none' - no scaling (this is the default). 0031 % 0032 % M is the length of longest input vector. If one vector is shorted, 0033 % it is zero padded. 0034 % 0035 % VERSION: $Id: ltpda_xcorr.m,v 1.7 2008/08/11 10:01:08 hewitson Exp $ 0036 % 0037 % HISTORY: 07-02-2007 M Hewitson 0038 % Creation 0039 % 0040 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0041 0042 function varargout = ltpda_xcorr(varargin) 0043 0044 warning('!!! This function is deprecated and will be removed from future versions of LTPDA. Use ao/xcorr now.'); 0045 0046 % Call ao/xcorr 0047 bs = xcorr(varargin{:}); 0048 0049 % set output 0050 varargout{1} = bs; 0051 end 0052 0053