Documentation Center

  • Trial Software
  • Product Updates

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.
configsetObjConfiguration set object that is to be removed from the model object.

Description

removeconfigset(modelObj, 'NameValue') removes 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 the configuration set object, configsetObj, from the SimBiology model, modelObj. The configuration set is not deleted; if you want to delete configsetObj, use the delete method.

If however, there is no MATLAB® variable holding the configset, removeconfigset(modelObj, 'NameValue') removes the configset from the model and deletes it.

Examples

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

    modelObj  = sbmlimport('oscillator');
    configsetObj = addconfigset(modelObj, 'myset');
  2. Remove the configset from modelObj by name or alternatively by indexing.

% Remove the configset with name 'myset'.
  removeconfigset(modelObj, 'myset');
         
 % Get all configset objects and remove the second.
  configsetObj = getconfigset(modelObj);
  removeconfigset(modelObj, configsetObj(2));
Was this topic helpful?