How can i solve this problem' when i am running, this message appears: Failure in initial objective function evaluation. FMINUNC cannot continue.

64 次查看(过去 30 天)
I'm writing a matlab program to try to fit a mathematical model to real data.

采纳的回答

Torsten
Torsten 2024-4-15,9:58
编辑:Torsten 2024-4-15,9:59
Call your function in which you define the sum of differences squared between real and modelled data for the initial values of your parameters and see what the problem is. Maybe the function returns something undefined or a vector of values instead of a single value.
  19 个评论
Torsten
Torsten 2024-4-16,12:19
编辑:Torsten 2024-4-16,12:21
Star Strider's code under
demonstrates how to use curve fitting for a system of ODEs.
But your code is ok - I doubt you can learn much from the link (except for "lsqcurvefit" as a different possible solver).
By the way: it would help if you used the google translator french -> english and post your comments in English:

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by