This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

setactiveconfigset (model)

Set active configuration set for model object


configsetObj = setactiveconfigset(modelObj, 'NameValue')
configsetObj2 = setactiveconfigset(modelObj, configsetObj1)


configsetObj = setactiveconfigset(modelObj, 'NameValue') sets the configuration set NameValue to be the active configuration set for the model object modelObj and returns to configsetObj.

configsetObj2 = setactiveconfigset(modelObj, configsetObj1) sets the configset configsetObj1 to be the active configset for modelObj and returns to configsetObj2. Any change in one of these two configset objects configsetObj1 and configsetObj2 is reflected in the other. To copy over a configset object from one model object to another, use the copyobj method.

The active configuration set contains the settings that are be used during a simulation. A default configuration set is attached to any new model.


  1. Create a model object by importing the oscillator.xml file, and add a Configset object to the model.

    modelObj  = sbmlimport('oscillator');
    configsetObj = addconfigset(modelObj, 'myset');
  2. Configure the simulation stop criteria by setting the StopTime, MaximumNumberOfLogs, and MaximumWallClock properties of the Configset object. Set the stop criteria to a simulation time of 3000 seconds, 50 logs, or a wall clock time of 10 seconds, whichever comes first.

    set(configsetObj, 'StopTime', 3000, 'MaximumNumberOfLogs', 50,...
        'MaximumWallClock', 10)
                            Active: 0
                    CompileOptions: [1x1 SimBiology.CompileOptions]
                              Name: 'myset'
                             Notes: ''
                    RuntimeOptions: [1x1 SimBiology.RuntimeOptions]
        SensitivityAnalysisOptions: [1x1 SimBiology.SensitivityAnalysisOptions]
                     SolverOptions: [1x1 SimBiology.ODESolverOptions]
                        SolverType: 'ode15s'
                          StopTime: 3000
               MaximumNumberOfLogs: 50
                  MaximumWallClock: 10
                         TimeUnits: 'second'
                              Type: 'configset'
  3. Set the new Configset object to be active, simulate the model using the new Configset object, and plot the result.

     setactiveconfigset(modelObj, configsetObj);
    [t,x] = sbiosimulate(modelObj);
    plot (t,x)

Introduced in R2006a

Was this topic helpful?