%% Find Usages of Observable Object
%
% 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)

%
% Copyright 2019 The MathWorks, Inc.