<< ffmt Frequency-Domain Processing frspec >>

Time Frequency Toolbox >> Time Frequency Toolbox > Frequency-Domain Processing > frpowerspec

frpowerspec

Computes the energy spectrum of the signal

Calling Sequence

[SP,F]=frpowerspec(X)
[SP,F]=frpowerspec(X,N)
[SP,F]=frpowerspec(X,N,H)
[SP,F]=frpowerspec(...,'plot')

Parameters

X :

A Nx elements real vector : the signal in time to be analysed.

N:

a positive integer: the number of frequency bins (default:Nx). For faster computation N should be a power of 2.

H :

real Nx elements vector: the analysis window,(default: window("re",Nx)).

TRACE :

A boolean (or a real scalar) if true (or nonzero),the progression of the algorithm is shown (default : %f).

'plot':

if one input parameter is 'plot', tfrqview is called and the time-frequency representation will be plotted.

SP :

A real column vector of size N: the energy spectrum of the signal.

F :

A real column vector of size N: the normalized frequencies.

Examples

sig=fmlin(128,0.1,0.4);
[SP,F]=frpowerspec(sig);
clf;plot(F,SP)
xlabel(_("Normalized frequency"));
ylabel(_("Energy spectrum"));

See also

cspect pspect

Authors


Report an issue
<< ffmt Frequency-Domain Processing frspec >>