question regarding convolution theorem
Please see help conv (especially third parameter) and help fft. Valid code sample:

x = zeros(1,256); x(120:170)=1;
y = zeros(1,256); y(120:170)=1;
z = conv(x,y,'SAME'); size(z)
z1= ifft(fft(x).*fft(y));
z2 = real(fftshift(z1));
plot(z2);