Assistant on MATLAB Lsqucurvefit

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

Show the code you need help with.
Does the data represent external inputs over time? Or does it represent outcomes that you are trying to adjust model parameters to match?
Yes it represent external input over time.
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)

Products

Release

R2020b

Asked:

on 8 Jun 2022

Commented:

on 8 Jun 2022

Community Treasure Hunt

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

Start Hunting!