Rowan-Classes/8th-Semester-Spring-2025/clinic-consultant/labs/lab-4/lab4q1.m
2025-05-05 11:41:09 -04:00

14 lines
183 B
Matlab

% 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));