get initial amounts of some species

Hi,
I want to tune the initial amount of one of the species in a simbiology model to fit experimental data but I can't do this with sbioparamestim function. Is there a way to do this in Simbiology?
Thanks,
Razvan

 Accepted Answer

As of R2011a, you can use sbioparamestim to estimate the initial amount of a species. If you can't easily upgrade to R2011a, you can either try another estimation function (e.g., sbionlinfit) or work around the limitation by estimating a parameter that controls the initial amount via an initialAssignment rule.
-Arthur
P.S. Here's a simple example to estimate the initial amount of x in the radiodecay model:
% Create a parameter and initial assignment rule
sbioloadproject radiodecay.sbproj m1
x = sbioselect(m1, 'Name', 'x');
x0 = m1.addparameter('x0', 1000, 'ValueUnits', 'molecule');
m1.addrule('x = x0', 'initialAssignment');
% Create synthetic data
c = sbioselect(m1, 'Name', 'c');
t = [1:10]'; y = 2000*exp(-c.Value*t);
% Fit the data, simulate, and plot
[x0Estimate, result] = sbioparamestim(m1, t, y, x, x0)
x0.Value = x0Estimate;
sd = sbiosimulate(m1);
plot(sd.Time, sd.Data, '-', t, y, 'x')

1 Comment

Thanks Arthur. So instead of giving the initial amount directly, you create a parameter and use a rule to assign the initial amount equal with that parameter. Tricky :)

Sign in to comment.

More Answers (0)

Communities

More Answers in the  SimBiology Community

Categories

Products

Community Treasure Hunt

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

Start Hunting!