DSPRelated.com
Forums

MUSIC Method

Started by sjs22kaes September 17, 2003
Could anyone help me convert the MATLAB code of the MUSIC Method to
Excel Spreadsheet. Or is there software that can you it?

function Px = music(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 x = x(:);
if M<p+1 | length(x)<M, error('Size of R is inappropriate'), end
R = covar(x,M);
[v,d]=eig(R);
[y,i]=sort(diag(d));
Px=0;
for j=1:M-p
Px=Px+abs(fft(v(:,i(j)),1024));
end;
Px=-20*log10(Px);
end;