function [B,hits]=rose2(w,r_bin,t_bin);
if(nargin==1),
  [A,B,hits,t_c,r_c]=binpol2(w);
elseif(nargin==2),
  [A,B,hits,t_c,r_c]=binpol2(w,r_bin);
else
  [A,B,hits,t_c,r_c]=binpol2(w,r_bin,t_bin);
end
rave=meang(B);
f=sum(hits);
nbins=length(f);

delta = 2 .* pi ./ nbins;
ang = delta .* (0:5) ./ 5;
w = [0 ang 0];
k = length(w);

d = ones(k,1) * (0:nbins-1) .* delta - pi;
z = (w.' * ones(1,nbins)) + d;
z = exp(sqrt(-1) .* z);
z(1:k-1:k,:) = zeros(2,nbins);
y = ones(k,1) * f;
z = z .* y;
z=z*exp(i*pi);
axis('square')
polar(angle(z), abs(z),'r-');
hold on
x=real(z(5,:));
y=imag(z(5,:));
%showvar(x,y,rave*10);
hold off

