% Set up x[n] for N=8 N = 8; n = 0 : N-1 x = (-1.0).^n; % 8-point DFT for N=8 dft8 = fft(x, 8); stem(abs(dft8)); % 9-point DTF for N=8 figure(2); dft9 = fft(x, 9); stem(abs(dft9));