March 24th, 2006, 3:11 am
Hi guys, I finally got it working.. dt = 0.1;xmin = -5;xmax = 5;hmin = -1;hmax = 1;x = [xmin: dt:xmax];h = [hmin: dt:hmax];y = xmin+hmin: dt:xmax+hmax;fbar = f(x);gbar = g(h);I = conv(fbar, gbar) * dt;I2 = real(ifft(fft(fbar, length(y)) .* (fft(gbar, length(y))))) * dt;With above, I equals to I2, which is excellent.. but someone told me I should do conj instead:I2 = real(ifft(fft(fbar, length(y)) .* conj((fft(gbar, length(y)))))) * dt;and then my convolution graph is shifted. What was the purpose behind conj?? I won't get the same result as conv then.... Thanks!!
Last edited by
boy on March 23rd, 2006, 11:00 pm, edited 1 time in total.