x=ones(1,2000);
y=ones(1,5000);
tic
N = length(x)+length(y)-1;
N = 2^ceil(log2(N));          % round up to a power of 2
v = ifft(fft(x,N).*fft(y,N));
ffttime = toc;
tic
w = conv(x,y);
convtime = toc;
plot([0:length(v)-1],real(v)); grid on
fprintf('conv takes %g times longer.\n',convtime/ffttime)
