fitnlm() makes a best fit of your model to your data. I don't believe it takes into account some criteria like the area under the fitted curve is in some range.
I'm attaching a demo to fit a power law with fitnlm(). Change the model to be what you need. If you need more help, attach your data in a .mat file.