How to set the time sample with Simbiology

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

Réponses (1)

Razvan
Razvan le 23 Juin 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 commentaire

Arthur Goldsipe
Arthur Goldsipe le 11 Juil 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

Connectez-vous pour commenter.

Communautés

Plus de réponses dans  SimBiology Community

Catégories

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by