Tags for questions about convolution, including the Mathematica functions Convolve, DiscreteConvolve, ListConvolve, DirichletConvolve, ImageConvolve, and convolutions using Fourier, FourierTransform, or LaplaceTransform.

learn more… | top users | synonyms

24
votes
3answers
2k views

How to find the center of a circular pattern?

I am writing an algorithm that finds the center of 500 x 500 pixels images coming from a live feed from a camera at 50 Hz. So it has to be quick! The images are images of an optical field which looks ...
12
votes
1answer
192 views

ListConvolve Memory Hemorrhage

Bug introduced in 10.0.0 and fixed in 10.2.0. I wrote a routine that convolves an impulse response array with a test array and checks for the RMS difference between that convolution and a data ...
12
votes
1answer
171 views

Why do singularities disappear when performing convolutions with the Dirac Delta function?

I am attempting to perform a convolution involving the Dirac Delta function: $\int_{-\infty}^{\infty} \frac{1}{t+1} \cdot \delta(t+1)\ dt$ I would expect that the result of this integral is ...
10
votes
2answers
2k views

Convolution with interpolated function

I have some problems to calculate in reasonable speed the convolution of an interpolated function with a Gauss function. I have here (ExampleData.txt, alternate Pastebin link) data which I ...
10
votes
1answer
902 views

Sparse convolution of sparse arrays

The documentation for ListConvolve mentions that "ListConvolve works with sparse arrays", which is true. The result, however is never sparse, eg: ...
8
votes
3answers
2k views

Discrete Convolution

Ask to compute the convolution of 2 lists, I managed to do so, with what I feel is rather heavy : Let my 2 lists be : a = {1,2,3,4} b = {1,1,1,1,1,1}; The below function adds 0s on each part of ...
8
votes
2answers
950 views

Speed up Mathematica code involving Convolve

I'm trying to plot the averaged autocorrelation function of a random wire profile $\xi(x)$ which is build from unitsteps which are each L units long. To calculate the average I'm generating nMax ...
7
votes
2answers
149 views

Good coding for a tricky expansion with convolutions, limits, substitutions

I am attempting to generate a power series in $v$ as $v\rightarrow0$ for $$g(x,v)\equiv \ln\int_{-\infty}^{\infty}e^{-y\left(z\right)}N\left(x-z,v\right)\,\mathrm{d}z $$ where ...
7
votes
2answers
355 views

Use of Cellular Automaton or Discrete Convolution to calculate Potts Energy of a 2D Matrix

In a project of Monte Carlo Modelling of Grain Growth (Link) one of the most costly subroutines is the calculation of the Potts-Energy of an Monte Carlo Grid cell by comparing the center cell value ...
6
votes
2answers
449 views

Convolve does not get the correct answer

Convolve[Sinc[x], Exp[-x^2], x, X] (* E^-X^2 π *) is obviously false, but why? Any suggestions ?
6
votes
1answer
1k views

Convolving/integrating problems

Let's say I want to convolve two functions (f and g), a gaussian with a breit-wigner: ...
5
votes
3answers
1k views

recursive integration

I am trying to do multiple integrations recursively. For instance, I would like to do the following equation for arbitrary integer $n$: $\displaystyle R_n(t) = \int_0^t \mathrm dt' R_0(t-t') ...
5
votes
3answers
2k views

cross-correlation with time lag

I have two lists with some data. a={1,2,3,4,5} b={5,4,3,2,1} Now I want to compute the cross correlation of the two lists with a time lag of 1, like it is ...
5
votes
1answer
180 views

How to fit data to a convolution equation

How to fit data to a convolution equation: ...
5
votes
1answer
86 views

ListConvolve with Padding -> Fixed?

The built-in function ImageConvolve takes a Padding option that "specifies what padding to use when extending beyond the ...
5
votes
0answers
134 views

Better way to compute triple (or higher order) convolution

I have an identity that I want to verify: $$\sum_{i+j+k\ge ...
4
votes
2answers
304 views

Graphing convolutions of user defined functions

I am a statistician who is very new to Mathematica. Ultimately I would like to be able to graph convolutions of arbitrary user defined functions. But I can't as yet obtain values of such ...
4
votes
1answer
83 views

Is it possible to recover the efficiency of ListConvolve when generalizing the convolution?

I've noticed that, while ListConvolve is very fast, it becomes much slower when you use anything but the standard Times,Plus as ...
4
votes
2answers
199 views

Error in Compiled function at runtime in spatial competition model

I just did a model of spatial competition between two species with different competitive ability & dispersal rates on a lattice with variables nrs of individuals per site. To speed it up I tried ...
3
votes
1answer
2k views

Convolution of two distribution functions

I have two functions; f[x_] = (1/k) Exp[-x/k] ; g[x_] = (1/p) Exp[-x/p] ; How I can convolve them? In Mathematica for convolving two functions we have this ...
3
votes
1answer
782 views

How do you use fourier transforms to perform a deconvolution

I've been trying to teach myself about deconvolution through fourier transforms, but I seem to be missing something simple, as my results are garbage. I start by defining a test function and a window ...
3
votes
0answers
74 views

Analytical Fourier Transforms with convolution rule [closed]

The task is the following, how to extend Mathematica's FourierTransform command in order to be able to analytically deal with non-linear differential equations. To do so it should be able to deal with ...
3
votes
0answers
474 views

How to make 3D object smooth?

This thread considers mathematical methods here to make the 3D object smooth but this question consider how to achieve the goal of smoothing a 3D object in Mathematica. I want to get smoother ...
2
votes
1answer
230 views

Challenge: deblurring images [duplicate]

My friend came back from holidays, where he took lots of pictures. Unfortunately, the camera was set on manual focus and most pictures are blurry. It got me thinking that mathematica showed how to ...
2
votes
1answer
118 views

Remove singularity at zero from $-((i^{-n} (-1 + i^n)^2)/(n^2 π^2))$

The expression h[n_] = -((I^-n (-1 + I^n)^2)/(n^2 π^2)) is real for all integers n. Although indeterminate at ...
2
votes
1answer
86 views

Why is DiscreteConvolve incorrect?

Let $h[n]=(\frac{1}{2})^n u[n]-3(\frac{1}{2})^{n-1}u[n-1]$ $g[n]=3^n u[n]-\frac{1}{2}3^{n-1}u[n-1]$ I convolved $h[n]$ and $g[n]$ in Mathematica and obtained the following result: ...
2
votes
1answer
111 views

Basic 2D convolution with mathematica

Can anyone tell me why the following keeps burning my CPU without ever producing the desired plot? ...
2
votes
2answers
139 views

Improving the speed/efficiency of multiple (finite range) convolutions for a causal response plot

So I am looking at modelling the response of a system that is excited by multiple pulses over a period of time. The way to find the response at time t is to take the convolution between the impulse ...
2
votes
0answers
109 views

Performing a convolution for smoothing a function

I want to smooth a one-dimensional oscillating function by convolving it with another function that I'll call the screening function. This screening function should have a trapezoidal form and go to ...
2
votes
0answers
100 views

Gradient Filter Function

I am trying to understand EXACTLY what the GradientFilter function in Mathematica is doing. As far as I can tell, it appears to be doing a convolution of a first derivative of a Gaussian with the ...
2
votes
0answers
293 views

How can estimate the PSF function to deblur an image of plate licence of a car [duplicate]

I want to deblur an image of a licence plate of a car. I have used the ImageDeconvolve[] function and Sharpen[] but the problem ...
2
votes
0answers
196 views

Partial convolution of random variables in random vectors

Suppose $(X_1,Y_1)$ is a bivariate random vector with a given distribution and let $X_2$ be a univariate random variable with the same distribution as $X_1$ but independent of $(X_1,Y_1)$. I want to ...
1
vote
1answer
83 views

Using ListDeconvolve to find velocity distrbution

Consider a Distribution of Particles correspondent with the NormalDistribution: PDF[NormalDistribution[], x] The Particles also have a velocity distribution: ...
1
vote
2answers
146 views

Is there a way to do a cyclic convolution analytically in Mathematica?

Let's say I want to convolve a Gaussian function Pulse[t_] = Exp[-(t - Mid)^2/(2 sig^2)]; with an exponential broadening function ...
1
vote
1answer
234 views

Plotting a convolution fails [closed]

i'm trying to plot a graph of a convolution and a discrete convolution, using Mathematica 8 ...
1
vote
1answer
402 views

How to find this convolution?

How can I use Mathematica to find the convolution $f*f$ for ...
1
vote
2answers
87 views

n fold convolution of a function via a recursion function

I wanted to write a recursion function to calculate the n-th convolution of a function f[x_]. I wrote the function ...
1
vote
1answer
647 views

Convolving data set with gaussian profile

I have a spectrum looking like List, and I want to convole it with a gaussian of the form PDF[NormalDistribution[μ, σ], x] (where σ also depends on x). The raw ...
1
vote
1answer
159 views

Convolution of a denstity function having a point mass with itself

My density function is as follows: ...
1
vote
2answers
95 views

How to convolve the unit box function and the modified Bessel function of the second kind in 2D?

In 1D the convolution of the unit box function and the modified Bessel function of the second kind $K_0(x)$ works very well. ...
1
vote
0answers
40 views

Speedup ListCorrelation when using generalized correlation function

ImageCorrelation provides several general function that can be used to replace the default Dot function. For example, in the documentation of ImageCorrelation, ...
1
vote
2answers
118 views

Conditional Convolution

I was hoping to incorporate an If function into a Convolve operation, as in ...
1
vote
0answers
235 views

Crosscorrelation for nonperiodic signals

I want to detect patterns (of an absorption spectrum which is nonperiodic) with Mathematica automaticly. I have found CorrelationFuncion but as far as I understand, ...
1
vote
0answers
296 views

Mathematica does not calculate inverse fourier transformation or the convolution of two functions

I am trying to take convolution of a Gaussian function with an exponential function. Mathematica couldn't calculate it. ...
1
vote
0answers
185 views

Derivatives of Convolutions with Integration by Parts and Delta Functions

I am not even certain how to approach this problem. f[x] is a pdf: positive definite, normalized, and approaching 0 at +/- Infinity p[x] is f[x] convolved to a normal dist of mean = 0, variance = v. ...
1
vote
0answers
452 views

Convolve two sets of (x,y) data sets

I have two sets of data in the form a={{.1,2},{.2,3},{.3,4},{.5,6}} b={{0,8},{.1,4},{.2,7},{.3,1},{.5,10},{.6,3}} Both data sets have even spacing, although ...
0
votes
1answer
397 views

Image convolution, motion blur

I define my degradation function as $$H(x,y;a,b,t)=\frac{T}{z}\sin z~e^{-jz}$$ where $$z=\pi(ax+by)$$ So I write ...
0
votes
1answer
1k views

How to plot the convolution of dirac delta series with a sine function [closed]

I am new to mathematica. I do the convolution of dirac delta :(DiracDelta(x-10)" with "sine(t),t=0-pi". How to plot the output ? Theoretically, the full wave should appear at the location of the ...
0
votes
1answer
210 views

Calculate expected value of custom pdf

I've a custom pdf in the sense that it's the convolution of several other PDFs p[t_] := Convolve[p1[x],p2[x],x,t]; Now I want to calculate the expected value of ...
0
votes
1answer
60 views

InverseFourierTransform very slow

I determined a distribution dist = SmoothKernelDistribution[ListOfValues];. Then I determined the FT of the PDF, which is the ...