‘The first state solution that is returned, is it the same as the initial condition?’
In my experience, yes. Sometimes it is the only solution if there are problems with the code and the other values are all not finite (NaN or ±Inf).
‘Now, for the sake of continuity in time, I want to combine the solutions from two different ode integrations. What is the best way to do this?’
I vertically concatenate the time vectors, and vertiocally concatenate the integrated solution matrices.
‘Should we remove the initial solution from the second integration and combine with the first solution?’
I generally do not, since the last row of the preceding integration likely overplots the first row of the next integration. It probably does not make any difference.
‘Also, for the corresponding time, should we consider the first solution time point of the second iteration to be exactly the same as the ending time point of the first integration?’
It most likely will be. You can always check to be sure.
.
0 Comments
Sign in to comment.