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

📄 music.m

📁 经典MUSIC算法谱峰搜索程序
💻 M
字号:
function P = music(Y,M,D,Lambda,Angles,Num)
%MUSIC     Multiple Signal Classification Method for direction finding.
%
%          Usage: P = MUSIC(Y,M,D,Lambda,Angles,Num)
%
%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 )
%  Lambda - the wavelength of source signal ( Same as D )
%  Angles - 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
%  Num - the number of sources
%
%Output parameter:
%
%  P - the spatial unified spectrum according to Angles.
%
%Also See : RTMUSIC, BMMUSIC, RBMUSIC
%
%Copyright (c) 1999-2019 by Chen Jianfeng
%         

error(nargchk(nargin,6,6));
R=Y*Y';        %covariance matrix
[V S]=eig(R); 
En=V(:,Num+1:M);  % En is called noise subspace
i=0;
P=zeros(size(Angles));
for ang=Angles
   a=exp(j*2*pi*D/Lambda*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 + -