www.pudn.com > SPICE.zip > SPICE.m, change:2011-11-12,size:1467b


function  x = SPICE(R,f,c,d,angleinterv) 
j = sqrt(-1); 
%R: augmented covariance matrix 
M0 = size(R,1); 
invR = pinv(R); 
%grid configuration 
theta = -90:angleinterv:90; 
N = length(theta); 
A = zeros(M0,N+M0); 
for  k = 1:N 
    A(:,k) = exp(-j*2*pi*(f/c)*(0:M0-1)'*d*sin((pi/180)*theta(k))); 
end 
A(:,N+1:N+M0) = eye(M0); 
%initialization: p_ini 
p_ini = zeros(1,N); 
for k = 1:N+M0 
    a = zeros(M0,1); 
    a(:) = A(:,k); 
    p_ini(k) = (a'*R*a)/(norm(a,2))^4; 
end 
%the first iteration  
p = zeros(1,N+M0); 
W = zeros(1,N+M0); 
for k = 1:N+M0 
    a = zeros(M0,1); 
    a(:) = A(:,k); 
    W(k) = (a'*invR*a)/M0; 
end 
R_ini = A*diag(p_ini.')*A'; 
invR_ini = pinv(R_ini); 
rau = 0; 
for k = 1:N+M0 
    a = zeros(M0,1); 
    a(:) = A(:,k); 
    rau = rau+sqrt(W(k))*p_ini(k)*norm(a'*invR_ini*R^(1/2),2); 
end 
for k = 1:N+M0 
    a = zeros(M0,1); 
    a(:) = A(:,k); 
    p(k) = p_ini(k)*(norm(a'*invR_ini*R^(1/2),2))/(sqrt(W(k))*rau); 
end 
%iteration 
i = 1; 
while i <= 100 
    i 
    p_ini(:) = p(:); 
    R_ini = A*diag(p_ini.')*A'; 
    invR_ini = pinv(R_ini); 
    rau = 0; 
    for k = 1:N+M0 
        a = zeros(M0,1); 
        a(:) = A(:,k); 
        rau = rau+sqrt(W(k))*p_ini(k)*norm(a'*invR_ini*R^(1/2),2); 
    end 
    for k = 1:N+M0 
        a = zeros(M0,1); 
        a(:) = A(:,k); 
        p(k) = p_ini(k)*(norm(a'*invR_ini*R^(1/2),2))/(sqrt(W(k))*rau); 
    end 
    i = i+1; 
end 
x = zeros(1,N); 
x(1,:) = p(1:N); 
x = abs(x);