This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

findUnusedComponents (model)

Find unused species, parameters, and compartments in a model


unused = findUnusedComponents(model)
unused = findUnusedComponents(model,dose)
unused = findUnusedComponents(model,dose,variant)



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.


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


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

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.


collapse all

Load a sample project.

sbioloadproject gprotein.sbproj

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

unused = findUnusedComponents(m1)
unused =

    0x1 empty handle

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)
   SimBiology Parameter Array

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

Introduced in R2016b