⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 music_spectrum.m

📁 谱估计的MUSIC算法
💻 M
字号:
function P = music(Y,M,d,Lamda,angle,K)
%MUSIC     Multiple Signal Classification Method for direction finding.
%
%          Usage: P = music(Y,M,d,Lamda,angle,K)
%
%Input parameters:
%
%  Y - M x N matrix, the array output data
%  M - the number of linear array
%  N - the snapshots used in estimation
%  d - the space of each two sensors ( Same as Lambda )
%  Lamda - the wavelength of source signal ( Same as D )
%  angle - the searching range in degree, For example, 
%           [-20:0.1:20] means search the angle from -20 deg. to 
%           20 deg. with step 0.1
%  K - the number of sources
%
%Output parameter:
%
%  P - the spatial unified spectrum according to Angles.
%
%         


error(nargchk(nargin,6,6));
R=Y*Y';        %covariance matrix
[V S]=eig(R); 
[A I]=sort(diag(S));
for i=1:M
    VV(:,i)=V(:,I(i,1));
end
En=VV(:,1:M-K);  % En is called noise subspace
i=0;
P=zeros(size(angle));
for ang=angle
   a=exp(j*2*pi*d/Lamda*sin(ang*pi/180)*[0:M-1]');  
   i=i+1;  
   P(i)=1/abs(a'*En*En'*a); 
end
P=10*log10(P/max(P));
return

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -