Multiple convolutions in Matlab

拥有回忆 提交于 2019-12-06 14:07:20

If the signal length is long, fft method would be better.

Below is an example.

t = linspace(-100,100,10000);

x = t.*exp(-t.^2);
y = exp(-4*t.^2).*cos(t);
z = (t-2)/((t-2).^2+3^2);
w = exp(-3*t.^2).*exp(2i*t);

L_x=fft(x);
L_y=fft(y);
L_z=fft(z);
L_w=fft(w);

L_u=L_x.*L_y.*L_z.*L_w; %convolution on frequency domain

u=ifft(L_u); 

figure(1)
plot(t,abs(u))
figure(2)
plot(t,real(u))
figure(3)
plot(t,imag(u))
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!