Matlab Program For Circular Convolution Property of DFT
The Matlab program demonstrates the circular convolution property of the discrete Fourier transform (DFT) by directly calculating the convolution of two signals x and h, and comparing it to the result of taking the DFT of each signal and multiplying the results. The program defines the signals x and h, pads each with zeros to length N1+N2-1, directly calculates the convolution y, takes the DFT of x and h and multiplies them, and plots the results of the direct convolution and DFT multiplication to show they are equal, demonstrating the circular convolution property.
Download as DOC, PDF, TXT or read online on Scribd
100%(1)100% found this document useful (1 vote)
5K views
Matlab Program For Circular Convolution Property of DFT
The Matlab program demonstrates the circular convolution property of the discrete Fourier transform (DFT) by directly calculating the convolution of two signals x and h, and comparing it to the result of taking the DFT of each signal and multiplying the results. The program defines the signals x and h, pads each with zeros to length N1+N2-1, directly calculates the convolution y, takes the DFT of x and h and multiplies them, and plots the results of the direct convolution and DFT multiplication to show they are equal, demonstrating the circular convolution property.
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2
Matlab program for circular convolution property of dft:x=[1,2,3,4]; %first signal
h=[3,6,9,5]; %second signal
N1=length(x); N2=length(h); X=[x,zeros(1,N2)];% padding of N2 zeros H=[h,zeros(1,N1)];% padding of N1 zeros for i=1:N1+N2-1 y(i)=0; for j=1:N1 if(i-j+1>0) y(i)=y(i)+X(j)*H(i-j+1); else end end end n=N1+N2-1; X1=fft(x,n); X2=fft(h,n); X=X1.*X2; subplot(211); stem(abs(X)); title('Answer using DFT method'); Y=fft(y,n); subplot(212); stem(abs(Y)); title('Answer using direct convelution');