www.gusucode.com > simbio 案例源码程序 matlab代码 > simbio/AccelerateSimulationUsingConfigsetandDoseObjectsExample.m

    %% Accelerate Simulation Using Configset and Dose Objects  
%
%% 
% Load a sample SimBiology project. 
sbioloadproject radiodecay.sbproj  

%% 
% Get the default configuration set from the model. 
defaultConfigSet = getconfigset(m1,'default');  

%% 
% Increase the amount of species |x| by 100 molecules at 2 seconds by
% adding a schedule dose.
dObj = adddose(m1,'d1','schedule');
dObj.Amount = 100;
dObj.AmountUnits = 'molecule';
dObj.TimeUnits = 'second';
dObj.Time = 2;
dObj.TargetName = 'unnamed.x';  

%% 
% Prepare the model for accelerated simulation using the default configset
% object and added dose object. 
sbioaccelerate(m1,defaultConfigSet,dObj);  

%% 
% Simulate the model using the same configset and dose objects. 
sim = sbiosimulate(m1,defaultConfigSet,dObj);  

%% 
% Plot the result. 
sbioplot(sim);