I see that the SimBiology product is tagged for this post, but the attached files are not using SimBiology. I'm one of the developers of SimBiology, and we try to make it easy to solve this exact sort of problem in SimBiology, so that you can focus on the modeling and analysis. If you want to learn how to translate this problem into SimBiology, let me know.
But it looks like you want to use lsqcurvefit for fitting, with your ODE model solved using ode45. To do that, you will need to construct your model function in the form that lsqcurvefit expects, as described here. Anonymous functions are often helpful for this. But you situation is a little too complicated to use anonymous functions alone. So, I wrote a helper function that solves the ODEs and calculates yield. See the attached upated files for my solution to your problem.
0 Comments
Sign in to comment.