I have to fit experimental data (x, y) with the function g(x)=(A*B*x)/(1+B*x))+K*x+L*x^n
.
This is my code:
x=[0;2;4;6;8;10;15;20;25;30;35;40;45;50;55;60;65;70;75;80;85;90];
y=[0.01;0.32;0.76;1.15;1.51;1.83;2.45;3.03;3.6;4.18;4.75;5.30;5.85;6.53;7.25;8.26;9.25;10.46;11.45;13.37;15.75;18.68];
g=fittype('((A*B*x)/(1+B*x))+K*x+L*x^n', 'independent',{'x'}, 'coefficients',{'A','B','K','L','n'});
f=fit(x,y,g,'StartPoint', [53.07, 0.003612, 0.139, 0.0002939, 2.454], 'Lower', [0 0 0.1 0 0 ],'MaxIter',100000);
plot(f)
hold on
scatter(x,y)
The problem is that it throws a figure with a curve which doesn't fit with experimental data.
Can anyone explain to me why ? How do I get a curve which fits with data ?