Main Content


Find out how a species, parameter, or compartment is used in a model



[componentList,usageTable] = findUsages(object) returns a vector of components that use the object and a table providing details about the usages. The object can be a species, parameter, or compartment object. For details of what SimBiology® checks to decide whether a component is used, see Component Usage.


[componentList,usageTable] = findUsages(object,dose) also searches for usages of the object in dose, which is a RepeatDose object, ScheduleDose object, or a vector of dose objects.


[componentList,usageTable] = findUsages(object,dose,variant) also searches for usages of the object in variant, which is a Variant object or a vector of variant objects.


collapse all

Load a sample project.

sbioloadproject gprotein.sbproj

Check and see how the rate of G protein inactivation parameter kGd is used in the model.

kGd = sbioselect(m1,'Name','kGd');
[components,usages] = findUsages(kGd);

components is a vector of components that use the parameter kGd. Display these components.

for i = 1:length(components)
ans = 
   SimBiology Reaction Array

   Index:    Reaction:
   1         Ga -> Gd 

ans = 
   SimBiology Kinetic Law Array

   Index:    KineticLawName:
   1         MassAction     

Based on the information from the usages table, the parameter is being used as a reaction rate parameter.

usages=2×3 table
              Component                       Property               Usage   
    _____________________________    __________________________    __________

    1x1 SimBiology.ModelComponent    {'ReactionRate'          }    {'kGd*Ga'}
    1x1 SimBiology.ModelComponent    {'ParameterVariableNames'}    {'kGd'   }

Input Arguments

collapse all

Species, parameter, compartment, unit, or unit prefix, specified as a Species object. Parameter object, and Compartment 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

List of model components that use the input object, returned as a vector.

Usage information, returned as a table. Table variables are:

  • Component– a vector of components that use the object

  • Property– a cell array of character vectors listing the corresponding properties that refer to the object

  • Usage– a cell array reporting the usages as follows:

    • For rules, the value of the Rule property,

    • For reactions, the value of the Reaction or ReactionRate property,

    • For kinetic laws, the name stored in the SpeciesVariableNames or ParameterVariableNames,

    • For events, the value of the Trigger property or the value of EventFcns{i}, where i the index of an event function that use the component.

    • For variants, the value of Content{i}, where i is the index of the content entry that use the component.

    • For doses, the value of the relevant property, that is, TargetName, DurationParameterName, or LagParameterName.

    • For species making use of a compartment, the name of the compartment listed in the Parent property of the species.

Version History

Introduced in R2016b