1function [C,bC]=trace_iat2bins(S,scale)
2% computes the counts C of S in each bin with timescale
"scale"
3% binC(i) gives the bin of membership element i
6bins = ceil((CS(end)-CS(1))/scale);
15 while CS(cur+1) <= i*scale
22 bC(end+1:end+(cur - last)) = i;