% Diversity Indices
br = [115   108    25     6    28    25     6     1];
%nbr = 314
in = [220   134   183    39    12     6     6    12];
%nin = 612
no = [83   104    16     8    14    18     2     1];
%nno = 246
us =  [99    94    21     8    18    18     5     2];
%nus = 265

Eh = @(f) (sum(f)*log(sum(f)) - ...
      sum( f.*log(f)))/(sum(f)*log(length(f)))
Ed = @(f) (sum(f))^2/(sum(f.^2)* length(f))

Eh(br)  % 0.7324
Eh(in)  % 0.7125
Eh(no)  % 0.6904
Eh(us)  % 0.7306

Ed(br)  % 0.4565
Ed(in)  % 0.4602
Ed(no)  % 0.4078
Ed(us)  % 0.4429


