simbio.diagram.setBlock
Syntax
Description
simbio.diagram.setBlock
sets properties of diagram blocks shown in SimBiology Model
Builder. The changes are instantly reflected in the app.
Before you run the function at the command line:
Open the corresponding SimBiology® model in the SimBiology Model Builder app.
Export the model from the app to MATLAB® workspace by selecting Export > Export Model to MATLAB Workspace on the Home tab of the app.
You can query and configure only the properties of the objects shown in the Diagram tab of the app. The objects shown in the diagram are compartments, species, reactions, rate rules, repeated assignment rules, and parameters that are on the left-hand side of a rate rule, a repeated assignment rule, or an event function.
simbio.diagram.setBlock(
sets the values of specified block properties of a SimBiology object or array of objects
sObj
,propertyNames
,propertyValues
)sObj
.
simbio.diagram.setBlock(
sets the property values specified by one or more name-value arguments.sObj
,Name,Value
)
Name
is the property name and Value
is the
corresponding value. Name
must appear inside quotes. You can specify
several name and value pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
You can specify a mixture of name-value arguments, structures, and cell array pairs of property names and values in the same function call.
simbio.diagram.setBlock(
displays the names and possible values of configurable block properties of a SimBiology
object sObj
)sObj
. sObj
must be scalar.
returns a cell array of possible values CV
= simbio.diagram.setBlock(sObj
,propertyName
)CV
for the block property
propertyName
. sObj
must be scalar.
simbio.diagram.setBlock(
sets the values of the specified block properties of a species object
speciesObj
,exprObj
,___)speciesObj
that is connected to an expression object
exprObj
. You can specify any combination of
Name,Value
pairs, structures, and cell array pairs of property names
and values as shown in previous syntaxes.
Use this syntax to configure the Position
,
Pin
, and Visible
properties of a specific cloned
block when you have multiple clones of the same species. Clones have the same values for all
the other properties.
simbio.diagram.setBlock(
displays the names of configurable block properties of a species object
speciesObj
,exprObj
)speciesObj
that is connected to an expression (reaction, rate rule,
or repeated assignment rule) object exprObj
.
Use this syntax to check the properties of a specific cloned block when you have multiple clones of the same species.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2021a