Working with ODE23 - Using a given data set

조회 수: 5 (최근 30일)
Dave Black
Dave Black 2017년 3월 10일
답변: Star Strider 2017년 10월 1일
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
Jan
Jan 2017년 10월 1일
편집: Jan 2017년 10월 1일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Star Strider
Star Strider 2017년 10월 1일
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.

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by