Main Content

findUsages

Find out how observable object is used in SimBiology model

Since R2020a

Description

example

[componentList,usageTable] = findUsages(obsObj) returns a vector of components that use the observable object obsObj and a table providing details about the usages. For information about how SimBiology® determines whether a component is used, see Component Usage.

Examples

collapse all

Load the Target-Mediated Drug Disposition (TMDD) model.

sbioloadproject tmdd_with_TO.sbproj

Use the target occupancy (TO) as a response.

cs = getconfigset(m1);
cs.RuntimeOptions.StatesToLog = 'TO';

Add an observable that calculates the maximum of the TO profile.

obs1 = addobservable(m1,'Max_TO','max(TO)');

Add another observable that references the first observable.

obs2 = addobservable(m1,'Max_Square','Max_TO.^2');

Find usages of the first observable.

[c,t] = findUsages(obs1)
c = 
   SimBiology Observable Array

   Index:    Name:         Expression:    Active:    Units:
   1         Max_Square    Max_TO.^2      true             

t=1×3 table
            Component               Property           Usage    
    _________________________    ______________    _____________

    1x1 SimBiology.Observable    {'Expression'}    {'Max_TO.^2'}

Input Arguments

collapse all

Observable object, specified as an observable object.

Output Arguments

collapse all

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

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

  • Component – Vector of components that use the object

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

  • Usage – Cell array of character vectors. Each character vector is the Expression property of another observable object that references the input object.

Version History

Introduced in R2020a