1 Star 1 Fork 1

hexiaoyun/DOA_Music

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test_music.m 1.00 KB
一键复制 编辑 原始数据 按行查看 历史
clc;
clear;
close all;
a=13.610e-3;
b=10.612e-3;
unnamed4(:,1) = [-a,-a,a,a];
unnamed4(:,2) = [-b,b,-b,b];
unnamed4(:,3) = [0,0,0,0];
x = unnamed4(:,1);
y = unnamed4(:,2);
z = unnamed4(:,3);
c = physconst('lightspeed');
f0 = 26e9;
lamda = c/f0;
N_x = 2^10; %快拍点数
iwave = 1;
st=randn(iwave,N_x);
%%
theta = [30];
phi = [20];
load("Rxx.mat","Rx");
[U,S] = eig(Rx);
[~,index] = sort(diag(S));
for i=1:size(Rx,1)
U(:,i) = U(:,i)/sqrt(U(1,i)^2+U(2,i)^2+U(3,i)^2+U(4,i)^2); % 做归一化
end
Un = U(:,index(1:(length(x)-iwave)));
Us = U(:,index(length(x)-iwave+1):end);
Gn = Un*Un';
dir=0:1:89;
ang=0:1:89;
Pmusic = zeros(length(dir),length(ang));
for i=1:length(dir)
for k=1:length(ang)
a_tao = x*cosd(dir(i))*sind(ang(k))+y*sind(dir(i))*sind(ang(k))+z*cosd(ang(k));
a_theta = exp(-1j*2*pi*a_tao/lamda);
abs((a_theta)'*Gn*a_theta)
Pmusic(i,k)=1./abs((a_theta)'*Gn*a_theta);
end
end
figure
mesh(Pmusic);
P_music = 10*log10(Pmusic/min(min(Pmusic)));
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/hexiaoyun1030/doa_-music.git
git@gitee.com:hexiaoyun1030/doa_-music.git
hexiaoyun1030
doa_-music
DOA_Music
master

搜索帮助