Spectrogram time-frequency distribution.
[TFR,T,F]=tfrsp(X) [TFR,T,F]=tfrsp(X,T) [TFR,T,F]=tfrsp(X,T,N) [TFR,T,F]=tfrsp(X,T,N,H) [TFR,T,F]=tfrsp(X,T,N,H,TRACE) [TFR,T,F]=tfrsp(...,'plot')
tfrsp computes the Spectrogram distribution of a discrete-time signal X.
A Nx elements vector (auto-SP) or a Nx by 2 array signal (cross-SP).
a real Nt vector with elements in [1 Nx] : time instant(s) (default: 1:NX).
a positive integer: the number of frequency bins (default:NX). For faster computation N should be a power of 2.
a real vector with odd length: the analysis window, H being normalized so as to be of unit energy. (default : Hamming(N/4)).
if nonzero,the progression of the algorithm is shown (default : 0).
if the last input parameter value is 'plot', tfrqview is called and the time-frequency representation will be plotted.
A real N by Nt array: the time-frequency representation.
A N vector of normalized frequencies.
N=128; sig=fmlin(N,0.1,0.4); h=window("kr",17,3*%pi); [TFR,T,F]=tfrsp(sig,1:N,N/2,h); clf;gcf().color_map= jetcolormap(128); subplot(121);Sgrayplot(T,F(1:$/2),TFR(1:$/2,:)'); subplot(122);plot(fftshift(F'),fftshift(TFR(:,100))) | ![]() | ![]() |