Uday
Uday
clear all;
N=input('enter the value of "n":');
x=input('enter the sequence:');
n=(0:1:N-1);
k=(0:1:N-1);
WN=exp((-1*1j*2*pi)/N);
nk=n'*k;
WNnk=WN.^nk;
xk=x*WNnk;
magx=abs(xk);
phasex=angle(xk)*180/pi;
subplot(2,1,1);
plot(k,phasex);
subplot(2,1,2);
plot(k,magx);
title('magnitude');