# Tag Info

8

The answer is that you are asking too much of deconvolution. The following code shows images blurred and refocused with different degrees of blurring. Do[blur = ImageConvolve[im, GaussianMatrix[n]]; focused = ImageDeconvolve[blur, GaussianMatrix[n]]; CellPrint[{blur, focused}], {n, 2, 6, 2}] Radius 2 blurred Radius 2 refocused Radius 4 blurred ...

5

Define a Gaussian kernel. The width is specified by s kernel = #2 Exp[-(t - #1)^2/(2 s^2)] &; Define a function to compute the correlation in terms of the convolution correlate[x_, y_, t, T_] := Convolve[x, y /. t -> -t, t, T] Test this by correlating two kernels at different times correlate[kernel[t1, 1], kernel[t2, 1], t, T] (* (E^(-((T - t1 + t2)...

4

ListConvolve is exactly what you want. But since it is a fairly general function, you need to specify the options correctly to get the specific end conditions you desire. Here is your example: a = {1, 2, 3, 4} b = {1, 1, 1, 1} c = {1, 0, 1, 0} ListConvolve[a, b, 2, 0] {3, 6, 10, 9} ListConvolve[a, c, 2, 0] {2, 4, 6, 3} As it says in the help file, the ...

3

I know you want an explicit formula for the pdf but I'm not sure that exists. Here's why: Your pdf2 is pdf2 = PDF[TransformedDistribution[(1/(1 + z1)), {z1 \[Distributed] UniformDistribution[{0, 1}]}], z2] So the brute force approach would be to get the pdf of $Z$ as follows: Integrate[(1/z1^2) PDF[NormalDistribution[0, s], z - z1], {z1, 1/2, 1}, ...

3

Something like this should work: f[n_] := f[n] = Function[ {x}, Evaluate@Integrate[f[n - 1][x - x1] f[1][x1], {x1, 0, x}] ] For example after specifying f[1] = Function[{x}, x] f[10] gives x^19/121645100408832000 Of course, if f[1] is so complicated that Mathematica cannot do some of the convolutions explicitly, this will ...

1

Another possibility is to use Convolve: Clear[f] f[n_] := f[n] = Function[ y, Evaluate @ Convolve[f[n-1][x] UnitStep[x], f[1][x] UnitStep[x], x, y, Assumptions->y>0] ] f[1] := Function[x, x] Multiplication by UnitStep changes the convolution to be over a finite interval (by default, Convolve uses an infinite interval). Then, we reproduce @...

1

Using partial memoization: Clear[p]; p[0] = Function[x, 1/(x + 1)*UnitStep[x]]; p[n_Integer?Positive] := p[n] = Function[x, Evaluate@Convolve[p[n - 1][y], p[0][y], y, x]] p[0][x] (* UnitStep[x]/(1 + x) *) p[1][x] (* ((-I \[Pi] + Log[-1 - x] + Log[1 + x]) UnitStep[x])/(2 + x) *) p[2][x] (* -(1/(3 (3 + x)))(2 \[Pi]^2 + 3 I \[Pi] Log[-2 - ...

1

Clear["Global`*"] k[h_, x_] = PDF[NormalDistribution[0, h], x] (* E^(-(x^2/(2 h^2)))/(h Sqrt[2 π]) *) Assuming that the first part takes the argument x - y rather than being distributed across x - y t[x_, y_] = ((k[h, #]*k[g, #] - k[g, #])^2) &[x - y] // Simplify (* (E^(-(((g^2 + h^2) (x - y)^2)/( g^2 h^2))) (-1 + E^((x - y)^2/(2 h^2))...

Only top voted, non community-wiki answers of a minimum length are eligible