Home > Scripts > Models > fconv.m

iFit/fconv

PURPOSE ^

FCONV Fast Convolution/Correlation

SYNOPSIS ^

function y=fconv(x, h, shape)

DESCRIPTION ^

FCONV Fast Convolution/Correlation
   y = FCONV(x, h, shape) convolves x and h. A deconvolution mode is also possible.
   The correlation, instead of the convolution, can also be computed.
   This FFT based convolution should provide the same results as conv2 and convn.
   It works with x and h being of any dimensionality. When only one argument is given,
     the auto-convolution/correlation is computed.
   The accuracy of the conv and xcorr operators depends on the sampling. Peaks should
     be describes with at least 5 points underneath.

  x     = input vector (signal)
  h     = input vector (filter)
  shape = optional shape of the return value
          full         Returns the full two-dimensional convolution.
          same         Returns the central part of the convolution of the same size as x.
          valid        Returns only those parts of the convolution that are computed
                       without the zero-padded edges. Using this option, y has size
                       [mx-mh+1,nx-nh+1] when all(size(x) >= size(h)).
          deconv       Performs an FFT deconvolution.
          deconv_iter  Performs an iterative deconvolution.
          correlation  Compute the correlation instead of the convolution (one
                       of the FFT's is then conjugated).
          pad          Pads the x signal by replicating its starting/ending values
                       in order to minimize the convolution side effects.
          center       Centers the h filter so that convolution does not shift
                       the x signal.
          normalize    Normalizes the h filter so that the convolution does not
                       change the x signal integral.
          background   Remove the background from the filter h (subtracts the minimal value)

 ex:     c=fconv(a,b); c=fconv(a,b, 'same pad background center normalize');

      See also FCONVN, FXCORR, CONV, CONV2, FILTER, FILTER2, FFT, IFFT

 Version: Aug. 22, 2017
 (c) E.Farhi, ILL. License: EUPL.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Tue 22-Aug-2017 11:03:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1