%% Central Part of Convolution
% Create two vectors. Find the central part of the convolution of u and v that is the same size as u.

u = [-1 2 3 -2 0 1 2];
v = [2 4 -1 1];
w = conv(u,v,'same')

% w has a length of 7. The full convolution would be of length length(u)+length(v)-1, which in this example would be 10.
% Copyright 2015 The MathWorks, Inc.