Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

conv

Convolution


Description

A Matlab/Octave compatible convolution function that uses the Fast Fourier Transform.

Usage

conv(x, y)

Arguments

x,y

numeric sequences to be convolved.

Details

The inputs x and y are post padded with zeros as follows:

ifft(fft(postpad(x, n) * fft(postpad(y, n))))

where n = length(x) + length(y) - 1

Value

An array of length equal to length(x) + length(y) - 1. If x and y are polynomial coefficient vectors, conv returns the coefficients of the product polynomial.

Author(s)

Original Octave version by Paul Kienzle pkienzle@user.sf.net. Conversion to R by Tom Short.

References

Octave Forge http://octave.sf.net

See Also

Examples

conv(c(1,2,3), c(1,2))
conv(c(1,2), c(1,2,3))
conv(c(1,-2), c(1,2))

signal

Signal Processing

v0.7-6
GPL-2
Authors
Uwe Ligges [aut, cre] (new maintainer), Tom Short [aut] (port to R), Paul Kienzle [aut] (majority of the original sources), Sarah Schnackenberg [ctb] (various test cases and bug fixes), David Billinghurst [ctb], Hans-Werner Borchers [ctb], Andre Carezia [ctb], Pascal Dupuis [ctb], John W. Eaton [ctb], E. Farhi [ctb], Kai Habel [ctb], Kurt Hornik [ctb], Sebastian Krey [ctb], Bill Lash [ctb], Friedrich Leisch [ctb], Olaf Mersmann [ctb], Paulo Neis [ctb], Jaakko Ruohio [ctb], Julius O. Smith III [ctb], Doug Stewart [ctb], Andreas Weingessel [ctb]
Initial release
2015-07-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.