You are on page 1of 1

x=[ones(1,8),zeros(1,8)];

n1=0:1:63;
n=64;
stem(n1,fft(x,n));
figure(2);
subplot(2,1,1);
stem(n1,abs(fft(x,n)));
title('Magnitude of 8 point fft');
subplot(2,1,2);
stem(n1,phase(fft(x,n)));
title('Phase of 8 point fft');
figure(3);
subplot(2,1,1);
stem(n1,real(fft(x,n)));
title('Real part of 8 point fft');
subplot(2,1,2);
stem(n1,imag(fft(x,n)));
title('Imaginary part of 8 point fft');

You might also like