Working with ODE23 - Using a given data set

5 vues (au cours des 30 derniers jours)
Dave Black
Dave Black le 10 Mar 2017
I am currently working on a problem that involves two differential equations that contain the variables a, b & c. I have a set of data that contains two columns. Both columns contain relevant results for the years 1961-2011. I have produced a scatter graph to show this data over time. My task in hand is to solve the differential equations in order to produce the best line of fit for the data mentioned. This means that specific values for the variables a, b & c will give me the lines of best fit for this one graph. I know that the values for a b & c all have a range respectively. I.e. Variable a falls between 0 & 0.6.
The problem I am having is that I am unsure of how to give each variable a range on Matlab correctly. I have tried to use For loops but not sure if this is the correct approach.
I am also having issues with, once ODE solver runs, giving a sum that will determine if the line of best fit is the best in comparison to the last one given for different values of a b & c.
If anyone could help me get started it would be greatly appreciated and I hope this is all easy to follow. If anything is unclear I would be happy to answer questions.
Thanks
  1 commentaire
Jan
Jan le 1 Oct 2017
Modifié(e) : Jan le 1 Oct 2017
I do not understand, what you are trying to do. What does "giving a variable a range" mean? Please explain clearly, which problem you want to solve. Using the mathematical terms might be useful.
[EDITED] Sorry, I've overseen that this thread is old.

Connectez-vous pour commenter.

Réponses (1)

Star Strider
Star Strider le 1 Oct 2017
The only guidance I can offer is my (eventually successful) solution to the Question in Monod kinetics and curve fitting (link). The lsqcurvefit function that I use here allows you to constrain the parameters.
I hope by now you solved this. I obviously didn’t see it when you originally posted it.

Community Treasure Hunt

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

Start Hunting!

Translated by