Assistant on MATLAB Lsqucurvefit

2 views (last 30 days)
Sunday Aloke
Sunday Aloke on 8 Jun 2022
Commented: Walter Roberson on 8 Jun 2022
I have 5 systems of odes And real data on excel I want to model fitting to real data using MATLAB Lsqcurvefit for (a) all parameters (b) for infected parameters.
Please I need help on the codes
  4 Comments
Sunday Aloke
Sunday Aloke on 8 Jun 2022
Yes it represent external input over time.
Walter Roberson
Walter Roberson on 8 Jun 2022
Unfortunately the mathematics of the ode*() solvers and bvp4c and bvp5c require that the equations have continuous second derivatives during any one call. In any case where there is external input, that cannot be the case unless you are willing to do cubic or spline interpolation of the inputs. That would correspond to saying that, for example, there is no hard "right turn" starting at 10 seconds, that instead you started turning right at time 0, just possibly stronger towards 10 seconds.
Whether this is acceptable depends on whether the inputs are considered to be "prescriptive" (this much control is added at this time), or if the inputs are considered to be descriptive (the system was doing its thing and when we measured it every two seconds this is what it looked like.)
In prescriptive systems where cubic or spline interpolation is not acceptable, the ode*() calls need to be terminated at each input and then restarted with the effect of the input added. A bit of a nuisance.

Sign in to comment.

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!