Home > Objects > @iFunc > xcorr.m



c = xcorr(a,b) : computes the correlation of iFunc models


function c = xcorr(a,b, shape)


 c = xcorr(a,b) : computes the correlation of iFunc models

   @iFunc/xcorr function to compute the correlation of data sets (FFT based).
     A decorrelation mode is also possible. When only one argument is given, 
     the auto-correlation is computed.
     when one of the argument is a character string, it is used as-is in the 
     operator expression. 

 input:  a: object or array (iFunc or numeric)
         b: object or array (iFunc 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)).
          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)
          deconv       Performs a deconvolution/decorrelation
     Default shape is 'same center'

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

 Version: Nov. 26, 2018
 See also iFunc, iFunc/times, iFunc/convn, iFunc/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