function k1k2k32
format long
clear all
clc
tspan = [0 6 24 44 68 72 74 92 104 116]';%%这是时间
yexp= [3.111,3.639,3.887,4.289,4.658,5.531,6.218,6.979,7.111,7.114]';%%%这是菌落总数
x0 = [3.111];
k0 = [0.1 3 45 4 37 8.1];
lb = [0 0 0 0 0 0];
ub = [100 100 100 100 100 100];
%
% % opts = statset('nlinfit');
% % opts.RobustWgtFun = 'bisquare';
% % mdll = fitnlm(tspan,yexp,ObjFunc,b0,'Options')
% mdll = fitnlm(tspan,yexp,ObjFunc,b0,'Options',opts)
options = optimoptions(@lsqnonlin,'Algorithm','trust-region-reflective');
[k,resnorm,residual,exitflag,output,lambda,jacobian] = ...
lsqnonlin(@ObjFunc,k0,lb,ub,[],tspan,x0,yexp);
ci = nlparci(k,residual,jacobian);
fprintf('\n\n使用