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

📄 source_eig2.m

📁 书籍Detection, Estimation, and Modulation Theory的Matlab源代码;
💻 M
字号:
% Two sources
% K. Bell
% 12/2/99


%************************
% Array
%************************
N = 10;                                 % Elements in array
d = 0.5;                                % sensor spacing half wavelength wrt wc
D = [-(N-1)/2:1:(N-1)/2].';
BWNN = 2/(N*d);
u=[-1:0.001:1];
nu=length(u);
vv = exp(j*pi*D*u);
%rho = 0.5*exp(j*pi/2);
rho = 0;

sigma_p = 10.^([0 30]/10);
sigma_s = [sigma_p(1) rho*sqrt(sigma_p(1)*sigma_p(2));...
      conj(rho*sqrt(sigma_p(1)*sigma_p(2))) sigma_p(2)];

nf = N;
%************************
% Source
%************************
dus = [[1.5:-0.05:0.05] [0.045:-0.005:0]];

ns = length(dus);
val1 = zeros(1,ns);
val2 = zeros(1,ns);
for n=1:ns
   us = [-dus(n)/2 dus(n)/2];
AS = exp(j*2*pi*d*D*us);

   R = AS*sigma_s*AS';
[v,lam] = eig(R);
[lam,ind] = sort(diag(abs(lam)));        % sort eigenvalues in ascending order 
v       = v(:,ind);                      % arrange eigenvectors in same order
v1 = v(:,N);
v2 = v(:,N-1);
val1(n) = real(lam(N))/nf;

val2(n) = real(lam(N-1))/nf;

B1 = v1'*vv;
B2 = v2'*vv;
figure(1)

subplot(2,1,1)
plot(u,10*log10(abs(B1).^2),'b');
hold on
plot(u,10*log10(abs(B2).^2),'r');

plot(us(1)*[1 1],[-60 30],'g')
plot(us(2)*[1 1],[-60 30],'g')
xlabel('u')
ylabel('Eigenbeams')
grid on
hold off
axis([-1 1 -50 20])

subplot(2,1,2)
plot(dus(1:n),10*log10(val1(1:n)),'b')
hold on
plot(dus(1:n),10*log10(val2(1:n)),'r')
plot([1 1]*2/N,[-40 40],'c')
hold off
axis([0 1.5 -40 40])
grid on
xlabel('\Delta u')
ylabel('Eigenvalue (dB)')

pause
end

⌨️ 快捷键说明

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