Azzera filtri
Azzera filtri

Conduct STFT analysis for chirp signal for 25% overlapping

4 visualizzazioni (ultimi 30 giorni)
Hello everyone, I really could use some help with chirp signal in matlab.. I need to visualize the result on spectogram, however i have no idea how to do the overlapping part. I really would be grateful for every hint :)
That is the code i got to import the chirp signal:
N = 4096;
N_DFT = 256;
n = 0:N-1;
fs = 8000;
t = n/fs;
f0 = 0;
f1 = 100;
x = chirp(t,f0,t(150),f1);
spectrogram(x, hamming(N_DFT), 3*N_DFT/4);

Risposte (1)

Bjorn Gustavsson
Bjorn Gustavsson il 12 Mag 2020
From the help for spectrogram:
S = spectrogram(X,WINDOW,NOVERLAP) NOVERLAP is the number of samples
each segment of X overlaps. NOVERLAP must be an integer smaller than
WINDOW if WINDOW is an integer. NOVERLAP must be an integer smaller
than the length of WINDOW if WINDOW is a vector. If NOVERLAP is not
specified, the default value is used to obtain a 50% overlap.
So if you want 25% overlap you should use something like this:
spectrogram(x, hamming(N_DFT), N_DFT*1/4);
Remember to read the help and documentation carefully, then play around with the different inputs and look at the results.
HTH

Categorie

Scopri di più su Signal Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by