Computes the energy spectrum of the signal
[SP,F] = frpowerspec(X) [SP,F] = frpowerspec(X, N) [SP,F] = frpowerspec(X, N, H) [SP,F] = frpowerspec(...,'plot')
A Nx elements real vector : the signal in time to be analysed.
a positive integer: the number of frequency bins (default:Nx). For faster computation N should be a power of 2.
real Nx elements vector: the analysis window,(default: window("re",Nx)).
A boolean (or a real scalar) if true (or nonzero),the progression of the algorithm is shown (default : %f).
if one input parameter is 'plot', tfrqview is called and the time-frequency representation will be plotted.
A real column vector of size N: the energy spectrum of the signal.
A real column vector of size N: the normalized frequencies.
sig = fmlin(128,0.1,0.4); [SP,F] = frpowerspec(sig); clf; plot(F,SP) xlabel(_("Normalized frequency")); ylabel(_("Energy spectrum")); | ![]() | ![]() |