function b = freq2bark(f)
%FREQ2BARK converts a frequency f in Hz to bark units
%     b = freq2bark(f), f is the frequency in Hz and b is the output in bark units 
 
if f<500,
    b=f/100;
else
    b=9+4*log2(f/1000);
end