SimBiology.RuntimeOptions
Options for logged SimBiology quantity components
Description
A SimBiology.RuntimeOptions
object contains information on
which species, parameters, or compartments are logged during simulation.
Creation
This object is a property of a Configset
object. Use dot notation or get
or set
to access and modify this object from a
configset
object.
Properties
StatesToLog
— Logged SimBiology quantity components
SimBiology.Species
| SimBiology.Parameter
| SimBiology.Compartment
| string | ...
Logged SimBiology quantity components, specified a
SimBiology.Species
, SimBiology.Parameter
,
SimBiology.Compartment
object, or vector of objects. Alternatively,
you can specify the object name or names as character vector, string, string vector,
cell array of character vectors.
Type
— Object type
'runtimeoptions'
(default)
This property is read-only.
Object type, specified as 'runtimeoptions'
. When you create a
SimBiology object, the value of Type
is automatically
defined.
Data Types: char
Examples
Specify a List of Species to be Logged During Simulation
Load the Lotka-Volterra model.
sbioloadproject lotka;
Get the configset object of the lotka model m1
.
configset = getconfigset(m1);
Display the list of species whose data are logged by default during the simulation.
configset.RuntimeOptions.StatesToLog
ans = SimBiology Species Array Index: Compartment: Name: Value: Units: 1 unnamed x 1 2 unnamed y1 900 3 unnamed y2 900 4 unnamed z 0
Suppose you want to log just species y1
and y2
data. You can specify their names as a cell array of strings and set it to StatesToLog
property.
configset.RuntimeOptions.StatesToLog = {'y1','y2'};
Confirm the setting.
configset.RuntimeOptions.StatesToLog
ans = SimBiology Species Array Index: Compartment: Name: Value: Units: 1 unnamed y1 900 2 unnamed y2 900
Alternatively, you can specify an array of species objects (instead of strings) to StatesToLog
property.
y1 = m1.Species(2); y2 = m1.Species(3); configset.RuntimeOptions.StatesToLog = [y1, y2];
Simulate and plot the results. Notice that simulation results of only y1
and y2
are plotted.
sbioplot(sbiosimulate(m1));
To reset to the default list, set StatesToLog
to a string 'all'
, which means all species objects, all nonconstant compartment objects and all nonconstant parameter objects are logged by default. A nonconstant compartment or parameter means that its Constant property is set to false.
configset.RuntimeOptions.StatesToLog = 'all';
Simulate again. Notice all the species data are plotted.
sbioplot(sbiosimulate(m1));
Do not specify 'all'
as a cell string such as {'all'}
. If so, SimBiology interprets it as a species named all
.
Version History
Introduced in R2006b
See Also
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)