Questions tagged [convolution]

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

0
votes
1answer
34 views

Convolve doesn't yeild expected answer, nor does integrate

I am convolving, or trying to, a Gaussian and a Lorentzian as follows: ...
1
vote
2answers
99 views

Getting Convolve to behave in preparation for NonlinearModelFit

New information added at bottom of post This is an outgrowth of this earlier question. Let us suppose that we have an instrumental response function given here: ...
0
votes
1answer
67 views

Convolve gives inconsistent results if performed symbolically and numerically

Response from Wolfram Technical Support at end. Suppose that I have an instrument response function of the form: ...
0
votes
1answer
80 views

Arrays, Mapping, and Convolutions

I'm trying to create a function that convolutes a 3D Normal Distribution to the points listed below. However, I think I'm going about it in the wrong way. When I try and convolve it with the points, ...
2
votes
1answer
80 views

Switch Function Is Not Working Properly

I'd like to select between the Tent and Hat function to convolve, but my switch function produces an error. I don't exactly need the initial plots. But I would like to plot the two that I select. <...
1
vote
1answer
82 views

Convolution in Fourier domain

I am computing the convolution of a disk Img in 2D numerical matrix form with a kernel Ker in the Fourier domain but the output ...
2
votes
1answer
145 views

Analog of MATLAB's conv2 in Mathematica?

I have a matlab code filter = 1; F = conv2(double([1 2 1]),double([1 2 1]'))/16; for i=1:some_integer filter = conv2(double(filter),double(F)); end In the ...
3
votes
1answer
74 views

How to prove a numerical identity?

Let be a function power function f[s_, r_] := Piecewise[{{s^r, s >= 0}, {0, True}}]; And its convolution ...
0
votes
0answers
40 views

Discrete convolution power

In my previous question we have discussed the posibility of various definition of convolution of power function within Mathematica. Now the question is "How to define convolution power in Mathematica ?...
7
votes
2answers
715 views

Does Mathematica reuse previous computations?

I am doing an analysis of experimental results in which I need to repeat the same GaussianFilter hundred of times on different data. As explained in the ...
2
votes
1answer
157 views

Rewrite the power sum in terms of convolution

Let be an identity $$n^{2m+1}=\sum_{r=0}^{m}A_{m,r}\sum_{k=0}^{n-1}k^r(n-k)^r,$$ where $A_{m,r}$ are real coefficients, see A302971 for numerators and formula of $A_{m,r}$. Here we can notice that $\...
0
votes
2answers
73 views

Convolve application

How to define the function $$f_m(s)=\begin{cases} s^m, \quad s\in[0,n]\\ 0, \quad otherwise \end{cases}$$ And to get its value of discrete self-convolution in $s=n$ by means of ...
1
vote
0answers
60 views

Convolve and Plotting

I want to convolute my equation with Gaussian function.I used following code for it but it does not give the output? How do I correct it ...
1
vote
0answers
63 views

Convolution of an Image with Gaussian sigma = 1

I'm new to image processing and I've been testing out different Gaussian blur filters. Out of curiosity, I generated an object that is a 2D Gaussian with sigma = 1. I convolved this object with a ...
0
votes
1answer
23 views

Table of convolutes

Inputs Start with a vector $x\in\mathbb{R}^{n}$, and a vector-valued function $f:\mathbb{R}^{n}\mapsto\mathbb{R}^{n}$. Output Given some $k\in\mathbb{Z}^{+}$, what are elegant ways to produce the ...
3
votes
0answers
169 views

Deconvolution using Fourier transforms

I have a 2D signal in the form of a function $g(x_m,y_m)$ given as $$ \begin{aligned} g(x_m,y_m) = \ & \int^{\infty}_{-\infty} \mathrm{d}x_o \ \mathrm{d}y_o \ \frac{1}{\varepsilon^2} P(x_o - x_m,...
0
votes
0answers
50 views

Convolve taking too long and producing error message Integrate::idiv:

The following functions do not produce an output."f1" is a convolution of Gaussian function and my model. It took too much time and gave an error message. I have attached that error message also. How ...
0
votes
1answer
79 views

Fitting complex equation

I used the following code for fitting but it does not produce an output.I kept it nearly 3 to 4 hours but it does not give any output. How should I make it correct?I have used two equation(f1,f2).I ...
1
vote
0answers
20 views

Convolve[…] behaves differently to that of Integrate[…] when numerically integrating the result

I am performing a convolution between two functions, and then I want to numerically integrate the result. If I go: ...
0
votes
1answer
154 views

Convolve and fitting

I want to convolve two equation, then I want to find the parameters. But it doesn't give the answer and Takes too much time. What is the wrong with my code? ...
0
votes
0answers
28 views

Help with Plot excluding parts of a curve even with “Exclusions” option set to “None” and speed up of code

I modeled a system mathematically. When the model is ideal, I can plot the results and export the plotted points. Everything works fine. Now, I started to model some imperfections of the system, but ...
2
votes
0answers
67 views

Use List convolve for aligning images

I am trying to align images of point spread functions using a convolution. Before doing it on real data, I wanted to try on simulated data. I have no problem with the 1-D case where I create 2 ...
5
votes
3answers
288 views

Can I use ListDeconvolve or any other functions to get the original kernel?

I have seen an example in the help document: data1 = {0., 0., 1., 2., 1., 2., 1., 0., 0., 0.}; ker = {1/3, 1/3, 1/3}; conv = ListConvolve[ker, data1, 2] my question ...
4
votes
1answer
158 views

Using Convolve and Manipulate

im trying to demonstrate the convolution process between 2 HeavysidePi function with Manipulate. im trying to get something like this GIF. i found how to demonstrate the convolution with : ...
1
vote
1answer
109 views

normalization of convolution product when using Fourier transform

I'm trying to calculate the convolution of two probability density functions (PDFs) defined on the real axis: a normal distribution (with \[Sigma] > 0 and ...
8
votes
1answer
208 views

Dilation on 3D Images?

I need to apply a dilated convolution to a 3D image, but dilation values greater than 1 are not currently supported in v11.3: ...
9
votes
1answer
183 views

NetEncoder for images of “Varying” dimension?

I'm looking for someway to do what this syntax "should" do: NetEncoder[{"Image", Automatic, ColorSpace -> "RGB"}] /@ imgs; The documentation states that ...
2
votes
0answers
101 views

Visualizing Trained Filters

In the first convolutional layer of NetModel "Wolfram..." , the parameters of the filter are 64 (number of filters), and 112x112 (size). The last convolutional layer has 192 55x55 filters. What ...
0
votes
0answers
119 views

Convolution Fitting

Here I have a piecewise function g: ...
1
vote
2answers
70 views

Infinite long sequence convolution error

I use version 11.2. ...
6
votes
2answers
346 views

Incorrect evaluation of a convolution

I want to evaluate a convolution for a stripe function and a Gaussian: ...
0
votes
1answer
114 views

Simple convolution

I have two lists, x and y, each of length Nx. I'm trying to create a function that gives the cross correlation at lag n. My attempt thus far is as follows: ...
5
votes
1answer
394 views

Convolution of Gaussian and Lorentzian functions

I have a Gaussian and a Lorentzian function here; gd[v_] = Sqrt[(4*Log[2]/Pi)]*(1/Dw)*Exp[-4*Log[2]*((v - v0)/Dw)^2] gl[v_] = (Lw/2/Pi)/((v - v0)^2 + (Lw/2)^2); ...
1
vote
1answer
74 views

Problem when trying to reverse function

A minimal example is below. I'm trying to reverse function y1d. ...
0
votes
1answer
99 views

Functional form of Delta function to perform convolution of continuous functions

I'm trying to get Mathematica to perform the convolution I need. I think it's fairly simple, just a convolution between a Normal distribution and a ...
0
votes
1answer
148 views

Numerical Integration Error

I'm new to Mathematica. I have written a code for performing a convolution integral (as follows) but it seems to be giving out error messages: My code is: ...
1
vote
2answers
188 views

Why doesn't the following code for recursive convolution work?

I'm trying to play with central limit theorem using Mathematica, so I wrote the following code, ...
0
votes
1answer
204 views

Computer convolution of sech squared function

I try to compute the analytic form of the convolution of $\operatorname{sech}$ squares function. Mathematica takes so much time to try and find the answer. Here is my code: ...
1
vote
0answers
98 views

Normalization and boundary issues with numerical convolution (ListConvolve function)

I have a somewhat messy piece-wise function that I need to convolve with a Gaussian function. Solving the problem analytically is taking forever so I would like to solve the problem numerically. ...
3
votes
1answer
249 views

Custom NetEncoder for lower resolution image input in a pre-trained Inception network

I have come across this neat explanation on how to adjust a pre-trained Inception neural net to an arbitrary number of classes by truncating the top layers. However, my input data does not come in $...
2
votes
1answer
50 views

GaussianFilter Slow Behaviour when std. Deviation in set to 0

The problem occurs when setting the $\sigma$ of the GaussianFilter to zero and using the method Method -> "Gaussian". The ...
3
votes
0answers
101 views

Symbolically find optimal convolution algorithm [closed]

A large portion of deep learning research goes into convolution neural networks, hence there's a need for a fast algorithm. I wonder if an optimal convolution algorithm can be found symbolically with ...
3
votes
1answer
126 views

Coefficients of Knuth's “Convolution Polynomials”

Donald E. Knuth gives in his paper Convolution Polynomials the code ...
7
votes
3answers
445 views

The curious case of Convolve function

Bug Introduced in Version 11 or earlier and persisting through 12.0 For integer values of $n$, I was trying to calculate the convolution of $t^{-n}$ with itself. So I wrote this: ...
1
vote
1answer
168 views

ListConvolve returns only one value

Generating my first function ...
0
votes
1answer
85 views

Convolve does not excecute [closed]

The following Convolve expression doesn't produce a result. ...
5
votes
0answers
160 views

Implementation of the Riesz transform

Implementing the Hilbert transformation \begin{equation}H(f)(x) = \frac{1}{\pi}\lim_{\varepsilon \to 0} \int_{|x-y|>\varepsilon} \frac{1}{x-y}f(y) \, dy,\end{equation} appropriate for 1-...
1
vote
0answers
90 views

Convolve returns false result

Bug introduced in 9.0 or earlier and fixed in 10.0 I tried to convolve sin with sin and got this unexpected result: Convolve[Sin[x], Sin[x], x, y] (* 0 *) Now I ...
2
votes
1answer
133 views

Multiple discrete RV convolutions performance

I have a discrete random variable with PDF of (just a simplified example) Piecewise[{{1/3, x == 5 || x == 10 || x == 15}}, 0] Actually, in my code this is a <...
1
vote
0answers
84 views

Convolution of circular densities

I have two distributions. One is a delta function which is non-zero on a circle at radius 1, the other is filled circle of the same radius. When I calculate their convolution I get something very ...