lsqcurvefit with multiple parameters

4 views (last 30 days)
Arie
Arie on 15 Apr 2020
I wanted to curve fit some experimental data so I used lsqcurvefit. The function has 3 parameters that have physical contraints, therefore I defined LB and UB for each of them. In the plot, the fitting well overlaps the experimental data and no errors appears on the command window. However, whatever (I tried with different order of magnitudes) the values of the upper bounds (UB) I assign to the parameters, I always get a triplet of estimated parameters in which one of them is equal to the upper limit imposed. It seems that lsqcurvefit is not able to find the most appropriate triplet of parameters that minimises the error. Can you help me?
w= 5;
e=w^2./(2.*t);
Flu2=@(par2,t) par2(3).*(1-par2(1).*(1-exp(-e./par2(2)).*((besseli(0,(e./par2(2))))+...
(besseli(1,(e./par2(2)))))))-((1-par2(3))*fin(2));
par2_0=[50 1 0.9]; % [K0, D, k]
LB2=[0 0 0];
UB2=[70 20 1.1];
par2=lsqcurvefit(Flu2,par2_0,t,seconda,LB2,UB2);
par2=
69.9995401756202 17.3646362443283 1.01526233563604

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!