My program is not using some of my initial conditions

1 view (last 30 days)
I have been trying to run my program and its running, but the problem is some of my initial conditions do not start from there. for example I used 19.6916 but it started from zero(0) instead until the 2206th second before it started integrating same with some others. I changed the initial conditions but it keeps using the previous one. Please what could be wrong
  4 Comments
Torsten
Torsten on 17 Apr 2019
The algebraic variables are initialized such that you start from a vector of consistent initial values. The fact that ode15s changes the values you provided means that your x0 vector didn't satisfy the algebraic equations.
Walter Roberson
Walter Roberson on 17 Apr 2019
x0(12) is not 31.3: it is 3.78
The value that is 31.3 is x0(13)
When I test, on the first call to gas_lift_ftn, the x values are exactly the same as the x0 values you set.
Note that your function is called with t=0 a total of 17 times as part of gradient estimation. Perhaps you happened to be looking at it on a call other than the first one.

Sign in to comment.

Answers (0)

Categories

Find more on General Applications 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!