Parameters estimation using lsqcurvefit

7 ビュー (過去 30 日間)
Mouna YAHYA
Mouna YAHYA 2021 年 4 月 9 日
コメント済み: Star Strider 2021 年 4 月 15 日
Hi I am trying to do parameter estimation following the code prepared by Star Strider ‘Igor_Moura'. I have added several differential equations and edited the code. But it does not run. I would really appreciate it if you would help me to solve my problem. Thank you.
Always I receive the following message : Failure in initial user-supplied objective function evaluation. LSQCURVEFIT cannot
continue.
Attached the script
Please help
  1 件のコメント
Mouna YAHYA
Mouna YAHYA 2021 年 4 月 14 日
up please help

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2021 年 4 月 14 日
I did not see this originally, or I would have responded to it several days ago.
The code needed some tweaks (that I will let you find, referring to the ‘Igor-Moura.m’ code will make this easier). I attached it here. It now runs, and produces:
Rate Constants:
p(1) = 5.09562
p(2) = 0.02642
p(3) = 3.25429
p(4) = -0.28403
p(5) = 1.06602
p(6) = 16.32329
p(7) = 0.20617
p(8) = 3.98434
p(9) = 1.38866
p(10) = 4.19445
p(11) = -5.18517
p(12) = 0.05000
p(13) = 0.67375
p(14) = 0.22527
p(15) = -0.22388
p(16) = 12.31547
p(17) = 14.00000
p(18) = -5.37072
p(19) = 79.89868
p(20) = -0.27531
p(21) = 19.43315
p(22) = 0.88034
p(23) = 20.60852
p(24) = 2.81029
p(25) = -0.48154
p(26) = 3.54883
p(27) = 0.07324
p(28) = 2.13279
p(29) = 1.30150
p(30) = 0.24330
p(31) = 121.96400
p(32) = 2.20000
p(33) = 2.20000
Adding:
for k = 1:size(yexp,2)
subplot(8,2,k)
plot(t, yexp(:,k), 'p')
hold on
plot(tv, yfit(:,k), '-r')
hold off
title(sprintf('Column %2d',k))
end
after the ‘yfit’ assignment demonstrates that the fit is not close, however now that the code runs, you can work on fixing it so that it produces better results.
  4 件のコメント
Mouna YAHYA
Mouna YAHYA 2021 年 4 月 15 日
okay I will see thank you for your answer
Star Strider
Star Strider 2021 年 4 月 15 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by