www.pudn.com > yuyinxinhaochulisuanfa.rar > mvdr.m
function [P,f]=mvdr(R,Npoints)
% Frequency estimate via the MVDR method
% [P,f]=music(R,Npoints) returns the pseudo spectrum of a autocorrelation
% matrix R in the vector P and Npoints-point frequency vector f.
%
% See also : ACORMX, MUSIC
% Copyright by Zhilin Zhang, Hanlin Laboratory
% $ Revision: 1.0 $ $ Date: 2003/04/04 11:24 $
% References:
% [1] 胡广书,数字信号处理——理论、算法与实现,清华大学出版社,1997
% get dimension of R
dims=size(R(:,1));
dim=dims(1);
InvR=inv(R); % inverse of R
deltf=2*pi/Npoints; % frequency value between neibor points
P=zeros(1,Npoints); % initialization of P and f
f=zeros(1,Npoints);
for index=0:Npoints-1
% design vector a,a=[1 exp(-j*w) exp(-j*w*2) ...exp(-j*w*(dim-1))]'.
a=zeros(dim,1);
for p=0:dim-1
a(p+1)=exp(-j*index*deltf*p);
end
% computer the denominator of Pmvdr
psum=a'*InvR*a;
P(index+1)=1/psum;
f(index+1)=index*deltf;
end