필터 지우기
필터 지우기

Why does it give wrong answer?

조회 수: 1 (최근 30일)
Sadiq Akbar
Sadiq Akbar 2022년 12월 31일
I took a code from the Mathworks site given below:
N = 10;
d = 0.5;
elementPos = (0:N-1)*d;
angles = [0 -25 30];
Nsig = 3;
R = sensorcov(elementPos,angles,db2pow(-5));
doa = rootmusicdoa(R,Nsig)
It works well. But when I change the 'elementPos' from linear to L-shaped array and change the angles vector to a 2 x M matrix so that to find both the angles (azimuth as well as the elevation), then it gives m the wrong answer. My modified code is as below:
clear al; clc
N = 10;
d = 0.5;
% elementPos = (0:N-1)*d;
elementPos = L1_Array(N-1);
elementPos=elementPos';
% angles = [0 -25 30];
angles = [-30 0 30; 10 20 40];
Nsig = 3;
R = sensorcov(elementPos,angles,db2pow(-5));
doa = rootmusicdoa(R,Nsig)
function r=L1_Array(N)
d = 0.5;%Inter-element spacing
rx = [(N-1)/2*d:-d:d,zeros(1,(N+1)/2)].';
ry = [zeros(1,(N+1)/2),d:d:(N-1)/2*d].';
r = [rx,ry,zeros(N,1)];
end
As can be seen, the azimuth angles are -30 0 and 30 while elevation angles are 10 20 and 40. But when I run this code, it gives me the following wrong answer:
doa =
-41.4097 -22.9068 -73.0831

답변 (0개)

카테고리

Help CenterFile Exchange에서 Direction of Arrival Estimation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by