File Exchange

image thumbnail

Statistical Spectrum and Frequency Estimation Examples

version (597 KB) by Ilias Konsoulas
Examples from the M. Hayes' famous book "Statistical Digital Signal Processing and Modeling".


Updated 21 Dec 2017

View License

Some important classical (non-parametric) and modern (parametric) statistical spectrum and frequency estimation algorithms are demonstrated, reproducing the examples from chapter 8 of M. Hayes book. Namely, the following Methods are exposed:
A) Non-parametric Methods.
i) The Periodogram.
ii) Barlett's Method: Periodogram Averaging.
iii) Welch's Method: Averaging Modified Periodograms.
iv) Blackman-Tukey Method: Periodogram Smoothing.
B) Parametric Methods.
i) The Autocorrelation Method.
ii) The Covariance Method.
iii) The Modified Covariance Method.
iv) The Burg Algorithm.

C) Frequency Estimation.
i) Pisarenko Harmonic Decomposition (PHD).
ii) Multiple Signal Classification (MUSIC).
iii) The Eigenvector Method.
iv) The Minimum Norm Algorithm.

Cite As

Ilias Konsoulas (2021). Statistical Spectrum and Frequency Estimation Examples (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (11)

Alex Myagkov

@ Ilias Konsoulas

Thanks for answers, but I have a problem: this page unavailable (error 404). Is it possible to get the files from another link, maybe they are somewhere else?

Ilias Konsoulas

@ Pedro: You must download the required SSP toolbox (from Hayes contribution) first to make all scripts runnable.

Pedro Marçal

i'm reading your code, it's great and it's helping me a lot!
but there are parts missing that makes it impossible to run and test. the methods from 8.5.3 are not written on the scripts
can tou please help here?
thank you

Muhammad Zubair

function Px = musich(x,p,M)

%MUSIC Frequency estimation using the MUSIC algorithm.


%USAGE Px=music(x,p,M)


% The input sequence x is assumed to consist of p complex

% exponentials in white noise. The frequencies of the

% complex exponentials and the variance of the white noise

% are estimated using the MUSIC algorithm.


% x : input sequence

% p : number of complex exponentials to find

% M : number of noise eigenvectors to use


% The frequency estimates are found from the peaks of the

% pseudospectrum Px.


% see also PHD, EV, and MIN_NORM



% copyright 1996, by M.H. Hayes. For use with the book

% "Statistical Digital Signal Processing and Modeling"

% (John Wiley & Sons, 1996).


x = x(:);

if M<p+1 | length(x)<M, error('Size of R is inappropriate'), end

[X R ]= corrmtx(x,M-1,'modified');




for j=1:M-p





Salim Rukhsar

Salim Rukhsar

when i run Example 8.6.5. A, Matlab shows phd is not defined. how should i define this. Thanks in advance

Ilias Konsoulas

All the examples and demos run perfectly on my machine, Windows 7, Home Premium and MatLab R2015b.


The link posted by Ilias Konsoulas no longer works. You can find the functions on this site here:

They do not work in modern matlab. There are some typos (N's need to be changed to M's) and some semicolons need to be removed form the end, for, and if functions. I will post a link later with the updated code when I get them all cleaned.

Nam Hoang Le

and a lot of functions I can not find in your examples. please show? Thank u

Ilias Konsoulas

@ Michael: As stated in the
"Other Requirements" section of this page, you need to download the book's companion software from:

Michael Nygaard

the music function used - where do I find this?

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!