MATLAB: Curve fitting with constraints

curve fittingCurve Fitting ToolboxexponentialMATLAB

Hi,
I am trying to fit an curve with an exponential function and need it to pass through (0,0) with a gradient of 0 at that point.
I've attached a picture of the data and curve. I am trying to use to the curve fitting toolbox to do this.
Any ideas would be greatly appreciated
Thanks

Best Answer

Using the 'power1' fit type, I obtain pretty close agreement.
>> cfit = fit(x1(x1>0),y1(x1>0),'power1')
cfit =
General model Power1:
cfit(x) = a*x^b
Coefficients (with 95% confidence bounds):
a = -0.07755 (-0.07888, -0.07622)
b = 3.316 (3.312, 3.32)
>> plot(cfit,x1,y1)