Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

24/09/14 15:56

MATLAB Command Window

>> xn=[1,1,1,1,zeros(1,4)];
N=8;
n=[0:1:N-1];
k=[0:1:N-1];
WN=exp(-j*2*pi/N);
nk=n'*k;
WNnk=WN.^nk;
Xk=xn*WNnk;
magXk=abs(Xk);
PhaXk=angle(Xk)*180/pi;
subplot(2,1,1);
>> plot(magXk);grid;
>> subplot(2,1,2);
>> plot(PhaXk);grid;
>> stem(PhaXk,'DisplayName','PhaXk');figure(gcf)
>> grid
>>

1 of 1

You might also like