How to implement MultiStart to find a good fit of two curves at the same time with real data such as our curves are governed by an ODE system?

4 Ansichten (letzte 30 Tage)
% Set up the problem for MultiStart
problem = createOptimProblem('lsqcurvefit','x0',k0,'objective',@simulatedhs,...
'lb',zeros(size(k0)),'xdata',tforward ,'ydata',[Hdata,HSdata] );
ms = MultiStart;
[k,fval,Exitflag,Output,Solutions] = run(ms,problem,50);
simulated_data = simulatedhs(k,tforward);
X=simulated_data(:,1);
Z=simulated_data(:,2);
%plot the result
figure(5)
plot(tforward,Hdata ,tforward,X)
plot(tforward,Hdata,tforward,Y)
legend('Data','Fitted result')
  13 Kommentare
Torsten
Torsten am 4 Aug. 2024
lb = [0 0 1 1 1 1 0 0 0 1 1];
ub = [1 1 inf inf inf inf 1 1 1 inf inf];
options = optimset('MaxFunEvals',10000,'MaxIter',10000);
[k,Rsdnrm,Rsd,ExFlg,OptmInfo,Lmda,Jmat] = lsqcurvefit(@simulatedhs,k0,tforward,[Hdata,HSdata],lb,ub,options);
Khadija
Khadija am 4 Aug. 2024
for now, MultiStart does not give a better result, I have not been able to solve the problem. I keep the estimate without multistart which gives a result close to the suitable one. Thank you again for your patience!!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by