Can ode45 handle vector of undetermined coefficients
Show older comments
Hi
I have a system of ODEs and I want to optimise its coefficients with fminsearch. However, "Not enough input argument" is shown when I used ODE45. I have optimised another single ODE's coefficient in the past and it succeed. So I would like to know can ODE45 handle more than one undetermined coefficients? Thank you!
Answers (3)
Torsten
on 6 Apr 2016
1 vote
The call to ODE45 must read
[T,X] = ode45(@(t,x)Est_Opt_VanillininVitro(t,x,k), time, [0.001 0 0 0.1 0.1]);
and the call
[T,Y]= ode45(@Opt_VanillininVitro , time, [0.001 0 0 0.1 0.1]);
can be deleted.
Then you must determine f (usually by building the sum of squared differences between Y and measurement data taken at the times specified in the "time" vector).
Best wishes
Torsten.
Since fminsearch suggests coefficients each time before ODE45 is called, there are no undetermined coefficients within ODE45.
We will have to see your code to find your programming error.
Best wishes
Torsten.
1 Comment
Torsten
on 6 Apr 2016
0 votes
Try
[T,X] = ode45(@(t,x)Est_Opt_VanillininVitro(t,x,k), time, [0.001; 0; 0; 0.1; 0.1]);
Best wishes
Torsten.
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!