Quantcast

Documentation Center

  • Trial Software
  • Product Updates

set (any object)

Set object properties

Syntax

set(Obj, 'PropertyName', PropertyValue)
set(Obj, 'PropertyName1', PropertyValue1, 'PropertyName2', PropertyValue2...)

Arguments

Obj

Abstract kinetic law, compartment, configuration set, event, kinetic law, model, parameter, PKCompartment, PKData, PKModelDesign PKModelMap, reaction, rule, SimData, species, or variant object.

'PropertyName'Name of the property to set.
PropertyValueSpecify the value to set. Property values depend on the property being set. See the reference page for an object property for values that can be specified.

Description

set(Obj, 'PropertyName', PropertyValue) sets the property 'PropertyName' of the object Obj, to PropertyValue.

set(Obj, 'PropertyName1', PropertyValue1, 'PropertyName2', PropertyValue2...) sets the properties 'PropertyName1' and 'PropertyName2' to PropertyValue1 and PropertyValue2 respectively, and so on in sequence. You can specify multiple PropertyName, PropertyValue pairs.

When you want to change the name of a compartment, parameter, or species object, use the rename method instead of set. The rename method allows you to change the name and update the expressions in which these components are used.

Examples

  1. Create a model object.

    modelObj = sbiomodel ('my_model');
  2. Add parameter object.

    parameterObj = addparameter (modelObj, 'kf');
  3. Set the ConstantValue property of the parameter object to false and verify.

    MATLAB® returns 1 for true and 0 for false.

    set (parameterObj, 'ConstantValue', false);
    get(parameterObj, 'ConstantValue')

    MATLAB returns

    ans =
    
         0
Was this topic helpful?