x = 0:0.5:5;
k = [0, 0.223904, 0.323333, 0.372308, 0.359143, 0.332033, 0.278462, ...
0.243394, 0.232222, 0.198334, 0.173414];
f = @(x, r) x./(r(1) + r(2)*x + r(3)*x.^2 + r(4)*x.^3);
r0 = ones(4,1);
r = fminsearch(@(r) fcn(r,x,k,f),r0);
xx = 0:0.01:5;
kfit = f(xx,r);
plot(x,k,'o',xx,kfit),grid
xlabel('x'),ylabel('k')
legend('data','curvefit')
function F = fcn(r,x,k,f)
y = f(x,r);
F = norm(y-k);
end
4 Comments
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/658538-how-do-you-solve-the-non-growth-rate-of-yeast-using-non-linear-regression-analysis#comment_1154233
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/658538-how-do-you-solve-the-non-growth-rate-of-yeast-using-non-linear-regression-analysis#comment_1154233
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/658538-how-do-you-solve-the-non-growth-rate-of-yeast-using-non-linear-regression-analysis#comment_1154253
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/658538-how-do-you-solve-the-non-growth-rate-of-yeast-using-non-linear-regression-analysis#comment_1154253
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/658538-how-do-you-solve-the-non-growth-rate-of-yeast-using-non-linear-regression-analysis#comment_1154283
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/658538-how-do-you-solve-the-non-growth-rate-of-yeast-using-non-linear-regression-analysis#comment_1154283
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/658538-how-do-you-solve-the-non-growth-rate-of-yeast-using-non-linear-regression-analysis#comment_1160068
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/658538-how-do-you-solve-the-non-growth-rate-of-yeast-using-non-linear-regression-analysis#comment_1160068
Sign in to comment.