I was studying this code:
fm = 8000;
dt = 1/fm; % dt=0.000125
t = [1:dt:5];
y = sin(2*pi*200*t);
tw = 0.05;
ws = 2 .^ round( log2( tw*fm ) ); % ws=512
o = ws/2; % o=128
w = hanning(ws);
[ X, f, tj ] = specgram( y, ws, fm, w, o );
What X represents is an array of Spectrums, one per "tw" windows on the signal. When I call:
plot(f,abs(X));
Matlab gives me the plot of one spectrum. Is that spectrum the summation of the all the spectrums of the signal?
Thanks in advance!
