One possibility:
bars = randi(20, 1, 5); % Created ‘Histogram’ Data
bins = 1:5;
f = @(c,x) log(c./x);
B0 = rand;
B = nlinfit(bins, bars, f, B0);
figure(1)
bar(bins, bars)
hold on
plot(bins, f(B,bins), '-r', 'LineWidth',1.5)
hold off
You will have to experiment with it to get the result you want. I can only claim that the code I posted here runs!