www.pudn.com > SPICE.zip > MRA.m, change:2011-11-14,size:1328b


clc 
clear all 
close all 
%% 
%Parameters setting 
deploy = 0:7;%Deployment of the sensors 
M = length(deploy);%number of the sensors 
f = 200;%carrier frequency 
c = 340;%propagation velocity 
d = 0.5*c/f;%sensor spacing unit 
j = sqrt(-1); 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
% cita = [-47.3 -28.1 -9.8 11.5 30.1 50.7]; 
% cita = [8 13]; 
cita = [-25 32]; 
% cita = [10 40 55]; 
% cita = [-20.8 3.2 27.5]; 
% cita = [-38 -22 -6 12 29]; 
% cita = [-47.3 -23.1 2.5 27.1 49.8]; 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
N = length(cita);%number of sources 
snap = 200;%number of snapshots 
SNR = -10;%signal-to-noise ratio 
sigman = 0.1; 
angleinterv = 1;%interval of angle searching 
flag = (N<=M); 
%Signal generation 
[X CRLB_theta] = MRA_output(cita,deploy,f,c,d,snap,sigman,SNR); 
R = X*X'/snap;%the original covariance matrix 
%% 
%%%%%%% SPICE using augmented covariance matrix 
x6 = aug_SPICE(R,f,c,d,angleinterv); 
% x6 = SPICE(R,f,c,d,angleinterv); 
max6 = max(x6); 
dbx6 = 10*log(x6/max6)/log(10); 
%% 
maxdb = max(abs(dbx6)); 
cita0 = -90:angleinterv:90; 
plot(cita0,dbx6,'m-') 
for k = 1:N 
    hold on 
    xv = cita(k)*ones(1,maxdb+1); 
    yv = -maxdb:1:0; 
    plot(xv,yv,'k:'); 
end 
hold off 
axis([-90 90 -maxdb 0]); 
xlabel('Bearing(Deg)'); 
ylabel('Spatial Spectra(dB)');