www.pudn.com > jaguar2s.zip > LOGPLOT.M


function b = logplot(x) 
 
% plot complex values as power 
S=size(x,2); 
 
b=x.*conj(x)/S; 
for i=1:S 
   if (b(i) == 0) 
   else 
       b(i)=10*log10(b(i)); 
   end; 
end; 
subplot(2,1,1); 
plot(b); 
 
I = real(x); 
Q = imag(x); 
for i=1:S 
   if (I(i) == 0)  
      d(i) = 0; 
   else 
      d(i) = atan(Q(i)/I(i)); 
   end; 
end; 
subplot(2,1,2); 
plot(d); 
 
return;