Hanning window Frequency Domain Graph
Mostra commenti meno recenti
Hello,
I have calculated the time domain of the hanning window through the formula.
But now I have to find the frequency domain by using fft and fft shift which i have calculated but I want to know is this graph correct or not?
M = 40;
n = -M / 2: M / 2;
window = 0.5 + 0.5 * cos (2 * pi * n / M);
figure;
plot (n, window);
L = length (window);
NFFT = 1024;
X1 = fftshift (fft (window, NFFT) / length (window));
Freq = (-NFFT / 2: NFFT / 2-1) / NFFT; % Frequency vector
figure;
plot (Freq, X1 (1: length (Freq)) / max (X1), 'r' );
Risposta accettata
Più risposte (1)
Leo Dokoza
il 7 Mar 2021
Modificato: Leo Dokoza
il 7 Mar 2021
0 voti
What does "M" stand for? Could you explain your code?
Categorie
Scopri di più su Fourier Analysis and Filtering in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!