As I said it in the comments, use the curve fitting toolbox offered by Matlab. Half of the work is already done there, you just need to input the right equation in there. mathworks.fr/fr/help/curvefit/index.html
I strongly suggest you to use cumulative distribution functions instead of histograms. Then you can use the integral of your models.