You are on page 1of 2

clc;

close;
clear;
y1=[1,2,3];
y2=[1,2,3,4];
fty1=mtlb_fft(y1,8);
fty2=mtlb_fft(y2,8);
y=convol(y1,y2);
subplot(1,2,1)
a=gca();
a.x_location="origin";
a.y_location="origin";
plot2d3(y);
xlabel("Time interval n");
ylabel("amplitude");
title("output of time convoluted signal");
fty=fty1.*fty2;
ifty=mtlb_ifft(fty,8);
subplot(1,2,2)
a=gca();
a.x_location="origin";
a.y_location="origin";
plot2d3(ifty);
xlabel("Time interval n");
ylabel("amplitude");
title("output of convolution using FFT and IFFT");

You might also like