在matlab中实现pisarenko方法

时间:2015-06-15 17:41:24

标签: matlab signal-processing spectrum

让我们假设我有以下代码

function [a,sigma] = phd(x,p)

%PHD    Frequency estimation using the Pisarenko harmonic decomposition.
%---
%USAGE  [a,sigma] = phd(x,p)
%
%   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 Pisarenko harmonic decomposition.  
%
%   The frequency estimates are found from the peaks of the
%   pseudospectrum
%                    1

%       -----------------------------------

%       1 + a(1)exp(jw) + ... + a(p)exp(jpw)    

%

%   or from the roots of the polynomial formed from the 

%   vector a.  The estimate of the white noise variance is 

%   returned in sigma.

%

%  see also MUSIC, 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(:);
   R = covar(x,p+1);
   [v,d]=eig(R);
   sigma=min(diag(d));
   index=find(diag(d)==sigma);
   a = v(:,index);
%[pxx,f]=periodogram(a,[],[],100);
%plot(f,pxx);
end

我需要它来自给定的自相关矩阵的最小方差的特征向量,估计在音乐情况下的伪谱,具有归一化频率,我该怎么办?喜欢这里给出

http://www.mathworks.com/help/signal/ref/pmusic.html

0 个答案:

没有答案