MATLAB: Fitting a sigmoid curve using curve fitting tool box

curve fittingdata

Hi, I am trying to fit a sigmoid function to the underlying data with the goodness of fit. I was using the curve fitting tool box. Unfortunately, i am not getting an idea to how to go forward with this. I tried to write custom function to fit the data, unfortunately, i am not able to get the required fit. Any help to solve this will be appreciated. X and Y data is shown below.
y= [0.70,1.09,0.96,0.37,0.27,0.35,0.16,0.18,0.18,0.02,0.37,0.67,1.26,1.70,1.85,1.73,1.92,1.72,1.47,1.50,1.46,1.43,2.12,1.6,1.8]
x = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]

Best Answer

Hi, Hair, the quailty of your data seems to be bad for sigmoid type of function. If take the function like:
y = y0+a/(1+exp(-(x-x0)/b))^c
Then the fitting result looks like: