Home > Objects > @iData > xcorr.m



c = xcorr(a,b,shape) : computes the correlation of iData objects


function c = xcorr(a,b, shape)


 c = xcorr(a,b,shape) : computes the correlation of iData objects

   @iData/xcorr function to compute the correlation of data sets (FFT based).
     A decorrelation mode is also possible with e.g. 
       shape='same center deconv' or shape='same center iter'. 
     When only one argument is given, the auto-correlation is computed.

 input:  a: object or array (iData or numeric)
         b: object or array (iData or numeric)
     shape: optional shape of the return value
          full         Returns the full two-dimensional correlation.
          same         Returns the central part of the correlation of the same size as a.
          valid        Returns only those parts of the correlation that are computed
                       without the zero-padded edges. Using this option, y has size
                       [ma-mb+1,na-nb+1] when all(size(a) >= size(b)).
          deconv       Performs an FFT deconvolution.
          deconv_iter  Performs an iterative deconvolution.
          pad          Pads the 'a' signal by replicating its starting/ending values
                       in order to minimize the correlation side effects
          center       Centers the 'b' filter so that correlation does not shift
                       the 'a' signal.
          normalize    Normalizes the 'b' filter so that the correlation does not
                       change the 'a' signal integral.
          background   Remove the background from the filter 'b' (subtracts the minimal value)
     Default shape is 'same center'

 output: c: object or array (iData)
 ex:     c=xcorr(a,b); c=xcorr(a,b, 'same pad background center normalize');

 Version: Nov. 26, 2018
 See also iData, iData/times, iData/convn, iData/fft, convn, fconv, fconvn


This function calls: This function is called by:
Generated on Mon 26-Nov-2018 15:08:42 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1