How to set the time sample with Simbiology

10 views (last 30 days)
Hi, My current problem is to fit a theoretical model for a chemical reaction (with 2 unknown parameters) to a bench of data. TO do that, I use Simbiology, where I define my reaction. Then I run the simulation with the function sbiosimulate. I have written an handle function @to_fit, wich gives me this theoretical solution. Then, I use the function lsqcurvefit to fit my function to_fit to the data. But my problem is that the vector returned by @to_fit doesn't have the same size than my data vector (it is the same time interval [0 90], but not the same number of points) . How could I choose the vector time in the function sbiosimulate ?
I hope my description is clear enough,
Thanks

Answers (1)

Razvan
Razvan on 23 Jun 2011
You can use resample like this
newSimDataObj = resample(simDataObj, timeVectorOfExpData);
You can also fit the parameters of the model using sbioparamestim. Check the examples from here: http://www.mathworks.com/help/toolbox/simbio/ref/sbioparamestim.html
Best, Razvan
  1 Comment
Arthur Goldsipe
Arthur Goldsipe on 11 Jul 2012
As of R2012a, there is also a new property on a model's configuration set titled OutputTimes that can be used to control the time values returned from a simulation: http://www.mathworks.com/help/toolbox/simbio/ref/outputtimes.html

Sign in to comment.

Communities

More Answers in the  SimBiology Community

Products

Community Treasure Hunt

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

Start Hunting!