Documentation Help Center. You can also use cconv to compute the circular cross-correlation of two sequences. Generate two signals of different lengths. Compare their circular convolution and their linear convolution.
|Published (Last):||18 April 2010|
|PDF File Size:||6.79 Mb|
|ePub File Size:||1.98 Mb|
|Price:||Free* [*Free Regsitration Required]|
Documentation Help Center. You can also use cconv to compute the circular cross-correlation of two sequences. Generate two signals of different lengths. Compare their circular convolution and their linear convolution. Use the default value for n. The resulting norm is virtually zero, which shows that the two convolutions produce the same result to machine precision. Generate two complex sequences. Use cconv to compute their circular cross-correlation. Flip and conjugate the second operand to comply with the definition of cross-correlation.
Specify an output vector length of 7. Compute their circular convolution with the default output length. The result is equivalent to the linear convolution of the two signals. The modulo-2 circular convolution is equivalent to splitting the linear convolution into two-element arrays and summing the arrays.
If the output length is smaller than the convolution length and does not divide it exactly, pad the convolution with zeros before adding. If the output length is equal to or larger than the convolution length, pad the convolution and do not add. Create two signals consisting of a 1 kHz sine wave in additive white Gaussian noise. The sample rate is 10 kHz. Put x and y on the GPU using gpuArray.
Obtain the circular convolution using the GPU. Input array, specified as vectors or gpuArray objects. Convolution length, specified as a positive integer.
Circular convolution of input vectors, returned as a vector or gpuArray. Introduction to Signal Processing. This function fully supports GPU arrays. A modified version of this example exists on your system. Do you want to open this version instead? Choose a web site to get translated content where available and see local events and offers.
Based on your location, we recommend that you select:. Select the China site in Chinese or English for best site performance. Other MathWorks country sites are not optimized for visits from your location. Toggle Main Navigation. Search Support Support MathWorks. Search MathWorks.
Off-Canvas Navigation Menu Toggle. Examples collapse all Circular Convolution and Linear Convolution. Open Live Script. Circular Convolution. Circular Cross-Correlation. Circular Convolution with Varying Output Length.
Input Arguments collapse all a , b — Input arrays vector gpuArray object. Output Arguments collapse all c — Circular convolution vector gpuArray object. Tips For long sequences, circular convolution can be faster than linear convolution.
References  Orfanidis, Sophocles J. See Also conv xcorr. No, overwrite the modified version Yes. Select a Web Site Choose a web site to get translated content where available and see local events and offers. Select web site.
Documentation Help Center. This example shows how to establish an equivalence between linear and circular convolution. Linear and circular convolution are fundamentally different operations. However, there are conditions under which linear and circular convolution are equivalent. Establishing this equivalence has important implications. For two vectors, x and y , the circular convolution is equal to the inverse discrete Fourier transform DFT of the product of the vectors' DFTs. Knowing the conditions under which linear and circular convolution are equivalent allows you to use the DFT to efficiently compute linear convolutions.
In mathematics in particular, functional analysis convolution is a mathematical operation on two functions f and g that produces a third function expressing how the shape of one is modified by the other. The term convolution refers to both the result function and to the process of computing it. It is defined as the integral of the product of the two functions after one is reversed and shifted. And the integral is evaluated for all values of shift, producing the convolution function.