function f = RD_freq(b)
%

num_cells = length(b);
f = 0;
for c = 1:num_cells-1
   if (b(c)==0) & (b(c+1)~=0)
      f = f+1;
   end
end
if (b(num_cells)==0) & (b(1)~=0)
   f = f+1;
end
