You are on page 1of 1

clear all;

clc;
x=input('enter the sequence');
N=length(x);
n=[0:1:N-1];
k=[0:1:N-1];
WN=exp(-j*2*pi/N);
nk=n'*k;
WNnk=WN.^nk;
XK=x*WNnk;
subplot(2,1,1);
stem(k,abs(XK));
subplot(2,1,2);
stem(k,angle(XK)*180/pi);

You might also like