%% Specify Times to Log Deterministic Simulation Output
% Specify the times during a deterministic (ODE) simulation that data is recorded.
% Create a model object named cell and save it in a variable named modelObj.

modelObj  = sbiomodel('cell');

%
% Retrieve the configuration set from modelObj and save it in a variable named configsetObj.

configsetObj = getconfigset(modelObj);

%
% Specify to log output every second for the first 10 seconds of the simulation. Do this by setting the OutputTimes property of the SolverOptions property of ConfigsetObj.

set(configsetObj.SolverOptions, 'OutputTimes', [1:10])
get(configsetObj.SolverOptions, 'OutputTimes')

% When you simulate modelObj, output is logged every second for the first 10 seconds of the simulation. Also, the simulation stops after the 10th log.
% Copyright 2012 The MathWorks, Inc.