DISCRETE FORIER TRANSFORM & INVERSE FORIER TRANSFORM MATLAB PROGRAM

DISCRETE FORIER TRANSFORM & INVERSE FORIER TRANSFORM


 


 

%Discrete forier transform


 

x1=input('Enter the sequence x1=');

N=input('Enter the value of N=');

xk=fft(x1)/N;

subplot(2,2,1);

n=0:1:length(xk)-1;

stem(n,abs(xk));

title('Absolute value of Forier transform');

subplot(2,2,2);

stem(n,angle(xk));

title('Angle of Forier transform');

pause;


 

%Inverse forier transform


 

xk1=ifft(xk)*N

subplot(2,2,3);

stem(n,xk1);

title('Input sequence');


 


 


 


 


 


 


 


 


 


 


 


 


 

Observation:


 

Enter the sequence x1=[1,2,3,4,5]

Enter the value of N=2


 

xk1 = 1 2 3 4 5


 


 


 


 


 

0 comments: