Graphics Programs Reference
In-Depth Information
cst = cos(th); snt = sin(th);
cs = [-cst; cst];
sn = [-snt; snt];
plot(rmax*cs,rmax*sn,ls,'color',tc,'linewidth',1,...
'handlevisibility','off')
% annotate spokes in degrees
rt = 1.1*rmax;
for i = 1:length(th)
text(rt*cst(i),rt*snt(i),int2str(i*30),...
'horizontalalignment','center',...
'handlevisibility','off');
if i == length(th)
loc = int2str(0);
else
loc = int2str(180+i*30);
end
text(-rt*cst(i),-rt*snt(i),loc,'horizontalalignment','center',...
'handlevisibility','off')
end
% set view to 2-D
view(2);
% set axis limits
axis(rmax*[-1 1 -1.15 1.15]);
end
% Reset defaults.
set(cax, 'DefaultTextFontAngle', fAngle , ...
'DefaultTextFontName', fName , ...
'DefaultTextFontSize', fSize, ...
'DefaultTextFontWeight', fWeight, ...
'DefaultTextUnits',fUnits );
% Tranfrom data to dB scale
rmin = 0; rmax=1;
rinc = (rmax-rmin)/rticks;
rhodb=zeros(1,length(rho));
for i=1:length(rho)
if rho(i)==0
rhodb(i)=0;
else
rhodb(i)=rmax+2*log10(rho(i))*rinc;
end
if rhodb(i)<=0
rhodb(i)=0;
end
end
Search WWH ::




Custom Search