%%function h=h_rot(data)
%%Rule of thumb selection of 

function h=h_rot(data)

data=data(:);
n=length(data);

percentiles=prctile(data,[25,75]);
R=percentiles(2)-percentiles(1);

h1=1.06*std(data)*n^(-1/5);
h2=1.06*(R/1.34)*n^(-1/5);

h=min(h1,h2);
