<< frpowerspec Frequency-Domain Processing iffmt >>

stftb >> stftb > Frequency-Domain Processing > frspec

frspec

Computes the spectrum of the signal

Calling Sequence

[SP,F] = frspec(X)
[SP,F] = frspec(X, T)
[SP,F] = frspec(X, T, H)
[SP,F] = frspec(...,'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 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] = frspec(sig);
clf; plot(F,SP)
xlabel(_("Normalized frequency"));
ylabel(_("Energy spectrum"));

Authors


Report an issue
<< frpowerspec Frequency-Domain Processing iffmt >>