Main Content

removeconfigset (model)

Remove configuration set from model

Syntax

removeconfigset(modelObj, 'NameValue')
removeconfigset(modelObj, configsetObj)

Arguments

modelObjModel object from which to remove the configuration set.
NameValueName of the configuration set.
configsetObjConfigset object that is to be removed from the model object.

Description

removeconfigset(modelObj, 'NameValue') removes and deletes the configset object with the name NameValue from the SimBiology® model object modelObj. A configuration set object stores simulation-specific information. A SimBiology model can contain multiple configuration sets with one being active at any given time. The active configuration set contains the settings that are used during the simulation. modelObj always contains at least one configuration set object with name configured to 'default'. You cannot remove the default configuration set from modelObj. If the active configuration set is removed from modelObj, then the default configuration set will be made active.

removeconfigset(modelObj, configsetObj) removes and deletes the configuration set object, configsetObj, from the SimBiology model, modelObj.

Examples

Remove Configset from SimBiology Model

Create a model object by importing the file oscillator.xml and add a configset.

m1 = sbmlimport("oscillator.xml");
cs1 = addconfigset(m1,"myset");

Remove the configset from the model by the configset name.

removeconfigset(m1,"myset");

Alternatively, you can remove using the index.

cs2 = addconfigset(m1,"myset2")
cs2 = 
   Configuration Settings - myset2 
     SolverType:                   ode15s
     StopTime:                     10

   SolverOptions:
     AbsoluteTolerance:            1e-06
     AbsoluteToleranceScaling:     true
     RelativeTolerance:            0.001
     SensitivityAnalysis:          false

   RuntimeOptions:
     StatesToLog:                  all

   CompileOptions:
     UnitConversion:               false
     DimensionalAnalysis:          true

   SensitivityAnalysisOptions:
     Inputs:                       0
     Outputs:                      0

allconfigsets = getconfigset(m1)
allconfigsets = 
   SimBiology Configuration Set Array

   Index:    Active:    SolverType:    Name:  
   1         true       ode15s         default
   2         false      ode15s         myset2 

Remove myset2 using its index.

removeconfigset(m1,allconfigsets(2));
getconfigset(m1)
ans = 
   Configuration Settings - default (active)
     SolverType:                   ode15s
     StopTime:                     10

   SolverOptions:
     AbsoluteTolerance:            1e-06
     AbsoluteToleranceScaling:     true
     RelativeTolerance:            0.001
     SensitivityAnalysis:          false

   RuntimeOptions:
     StatesToLog:                  all

   CompileOptions:
     UnitConversion:               false
     DimensionalAnalysis:          false

   SensitivityAnalysisOptions:
     Inputs:                       0
     Outputs:                      0

Version History

Introduced in R2006a