MATLAB: Get initial amounts of some species

initial amountSimBiology

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

Best 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')