New answers tagged

6

(1) Convolution with Plus and Times can be done via FFT. (2) The overall speed complexity cannot be less than the size-of-result complexity. Point (1) might help to explain why the standard ListConvolve is fast under most circumstances. Point (2) on the examples in this post should help to explain why LC2 is likely to be slow. To make this clear we can ...


3

If you need result at some sensible time frame vs quality... f[x_, y_] := Piecewise[{{1, Sqrt[x^2 + y^2] < 1}}] nconv[t_, z_] := NIntegrate[f[x, y] f[x - t, y - z], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}] data = ParallelTable[nconv[t, z], {t, -3, 3, .2}, {z, -3, 3, .2}]; // AbsoluteTiming {57.205376`, Null} ListPlot3D[data, ...


2

Notice that NConvolve is blue, this means it isn't one of the pre-defined functions. You have to define the function yourself (or just grab Andrew Moylan's version here) NConvolve[f_, g_, x_, y_?NumericQ] := NIntegrate[f (g /. x -> y - x), {x, -Infinity, Infinity}] Which makes the plot work just fine Ol3v22[y_?NumericQ] := NConvolve[Sd[t], ...



Top 50 recent answers are included