Here is an example of convolution given:
I have two questions here:
Why is the vector 𝑥 padded with two 0s on each side? As, the length of kernel ℎ is 3. If 𝑥 is padded with one 0 on each side, the middle element of convolution output would be within the range of the length of 𝑥, why not one 0 on each side?
Explain the following output to me:
>> x = [1, 2, 1, 3]; >> h = [2, 0, 1]; >> y = conv(x, h, 'valid') y = 3 8 >>
validdoing here in the context of the previously shown mathematics on vectors 𝑥 and ℎ?