Main Content

findUnusedComponents (model)

Find unused species, parameters, and compartments in a model

Description

unused = findUnusedComponents(model) returns a vector of species, compartments, and parameters that are not used in model, which is a SimBiology® Model object. For details of what SimBiology checks to decide whether a component is used, see Component Usage.

example

unused = findUnusedComponents(model,dose) also searches for unused components in dose, which is a RepeatDose object, ScheduleDose object, or a vector of dose objects.

example

unused = findUnusedComponents(model,dose,variant) also searches for unused components in variant, which is a Variant object or a vector of variant objects.

example

Input Arguments

collapse all

SimBiology model, specified as a SimBiology Model object.

Dose object, specified as a ScheduleDose object, RepeatDose object, or vector of dose objects.

Variant, specified as a Variant object or vector of variant objects.

Output Arguments

collapse all

Unused components, returned as a vector of species, parameters, and compartments.

Examples

collapse all

Load a sample project.

sbioloadproject gprotein.sbproj

Check if there is any unused species, compartments, or parameters.

unused = findUnusedComponents(m1)
unused = 
  0x1 QuantityComponent array with properties:

    Constant
    Value
    Units
    BoundaryCondition
    Name
    Parent
    Notes
    Tag
    Type
    UserData

Add some parameters to the model that are not used.

p1 = addparameter(m1,'p1');
p2 = addparameter(m1,'p2');

Look for those unused parameters.

unused = findUnusedComponents(m1)
unused = 
   SimBiology Parameter Array

   Index:    Name:    Value:    Units:
   1         p1       1               
   2         p2       1               

Version History

Introduced in R2016b