Convolution in Matlab with different "sampling"

1.2k Views Asked by At

I am trying to figure out how to "normalize" the convolution that Matlab does (using the "conv" operator). If I have a rect function with spacing T and I do the convolution of that function with itself, I should get a triangle with a height of 1. Instead, the height of the convolution depends on the spacing I use (T). So to "normalize" it I found in other places that I need to multiply by the spacing T. I am not sure I understand why - can anyone mathematically show me why?

1

There are 1 best solutions below

0
On

It's the difference between continuous time convolution and discrete convolution.

$$ \mathrm{Continuous:} \,\,\, \int f(x-h) g(x) \mathrm{d}x \\ \mathrm{Discrete:} \,\,\, \sum f[x-h]g[h] $$

The sample spacing is essentially the $\mathrm{d}x$ in the convolution integral that will give you the area, so you need to scale the result of the discrete convolution by it if you want the two be the same. Otherwise, the triangle will have height $N$, where $N$ is the number of nonzero samples in the $\mathrm{rect}$ function.