P = 11;
theta = linspace(-68.92, 57.18, P);
% theta = sort(rand(1, P) .* 60);
% theta = [-40 -18 12 36];
% theta = [-40 -18 36];
%%% non-circular
% phiHalf = theta + 1;
phiHalf = linspace(3.92, 67.18, P);
Phi = diag(exp(1j * phiHalf / 180 * pi / 2));
monteIndex = [];
snrCount = 8;
RMSE = zeros(3, snrCount);
bestLambda = zeros(snrCount, 200);
for snrIndex = 1 : 1 : snrCount
snr = -6 + (snrIndex - 1) * 3;
monteIndex(snrIndex) = 0;
RMSE(:, snrIndex) = 0;
count = 0;
for monte = 1 : 500
signalFlag = 0;
Nsub = 4000; % total number of snapshots
if signalFlag == 0 %%% Gaussian and non-circular
Sr = randn(P, Nsub);
F = 1;
end
% Sr = [1 zeros(1, Nsub -1);zeros(1, Nsub -1) 1].*50;
% Sr = [1 zeros(1, Nsub -1);zeros(1, Nsub -1) 1;zeros(1, Nsub -2) 1 0].*50;
S = Phi * Sr; %%% signal
%%
derad = pi/180;
radeg = 180/pi;
twpi = 2 * pi;
N = 10;
N1 = 5;
N2 = N - N1;
J = ceil(N2 / 2) - 1;
L1 = (0 : 1 : (N1 - 1)).* (N2 + 1);
subL2 = 1 + J : 1 : N2;
L2 = ((N1 - 1) * (N2 + 1)).* ones(1, length(subL2)) + subL2;
subL3 = 1 : J;
L3 = (N1 * (N2 + 1)).* ones(1, length(subL3)) + subL3;
locationIndex = [L1 L2 L3];
displace = 4;
locationIndexSliding = locationIndex + (displace - 1).* ones(1, (N1 + N2));
virtualIndex1 = [];
virtualIndex2 = [];
virtualIndex3 = [];
virtualIndex4 = [];
for ii = 1 : (N1 + N2)
for jj = 1 : (N1 + N2)
tempDiff1 = -locationIndexSliding(ii) + locationIndexSliding(jj);
virtualIndex1 = [virtualIndex1; tempDiff1]; %kron(a*,a)
tempConjugate = -locationIndexSliding(ii) - locationIndexSliding(jj);
virtualIndex2 = [virtualIndex2; tempConjugate]; %kron(a*,a*)
tempSum = locationIndexSliding(ii) + locationIndexSliding(jj);
virtualIndex3 = [virtualIndex3; tempSum]; %kron(a,a)
tempDiff2 = locationIndexSliding(ii) - locationIndexSliding(jj);
virtualIndex4 = [virtualIndex4; tempDiff2]; %kron(a,a*)
end
end
lamda = 1;
dd = lamda / 2; %阵元间距
dETNA = dd.* locationIndexSliding;
P = length(theta); % 信元数
A_ETNA = exp(1j * dETNA.' * twpi * sind(theta));
end
end
copy上ETNA的code,关于拓展嵌套阵该如何code
记得点赞,没时间写blog中。。。