I would like to improve the initial value guess x0 for lsqcurve fit. I need to be able to do it automatically without changing the values in the script. Is there a way to do this?
I need to be able to fit multiple curves so its not practical to change the initial values by hand. My code looks like
%%----------------EXAMPLE CODE
b0=[mean(data),data(1,1),0,1,1,1]; %<------WANT TO AUTOMATE THIS LINE TO IMPROVE FIT, SPECIFICALLY THE LAST 4 NUMBERS
fun_model=@(b,time)b(1)+b(2)*exp((b(3)*(1+b(4)... *(log(time)).^(-b(5)))).^(2));fit=lsqcurvefit(fun_model,b0,time,data,lb,ub,'options')%%----------------
Best Answer