|
"Giovanni " <rita.macri@tiscali.it> wrote in message <icqnl3$s5k$1@fred.mathworks.com>...
> hi,
> I have a model of 10 differential equations (10 variablese) and 17 parameters.
> Now, I would to make a biforcation diagram (1 variable vs 1 parameters) at steady state. How do I create it?
Hi Giovanni,
Am I correct that you are implementing your model using SimBiology? If so, you will need to construct this plot yourself after determining the steady-state state values for different parameter values. To help you a bit more, at the bottom of this message I include sample MATLAB code for creating a bifurcation diagram for a simple model that exhibits an abrupt change in behavior at a parameter value of 0.25.
Good luck! If you are using SimBiology, please post again (or email me) if you have any other questions for feedback about SimBiology.
-Arthur
% Construct a simple model that exhibits bifurcation
m1 = sbiomodel('bifurcation');
x = m1.addspecies('x', 0.5);
p = m1.addparameter('p', 0, 'ConstantValue', false);
m1.addrule('x = x*(1-x) - p', 'rate');
% Add an event to keep x from going negative.
m1.addevent('x <= 0', {'x = 0', 'p = 0'});
% Simulate until time = 1000 to approximate steady state
cs = m1.getconfigset;
cs.StopTime = 1000;
cs.RuntimeOptions.StatesToLog = x;
% Accelerate the model to improve performance of multiple simulations
sbioaccelerate(m1);
% Sample p values from 0.15 to 0.35
pValues = linspace(0, 0.3, 1000);
xValues= zeros(size(pValues));
for i = 1:numel(pValues)
p.Value = pValues(i);
[tSim,xSim] = sbiosimulate(m1);
xValues(i) = xSim(end);
end
% Plot the bifurcation diagram
plot(pValues, xValues);
xlabel('p values');
ylabel('x value at steady state');
title('Bifurcation analysis of a SimBiology model');
|