Main Content

sltest.observer.getObservedModel

Get system model linked to Observer model

Since R2024b

Description

sysmodel = sltest.observer.getObservedModel(obsmodel) gets the handle of the system model linked to the specified Observer model. An Observer model contains Observer Port blocks that each observe an element in the system model.

example

Examples

collapse all

This example requires a Stateflow® license.

import sltest.observer.*
openExample("sf_car")

mdlHandle= get_param(gcs,"Handle");
obsref = addObserverReference(mdlHandle);

obsmodelHandle = get_param(gcs,"Handle");
obsd_model = getObservedModel(obsmodelHandle)
obsd_modelName = get_param(obsd_model,"Name")

Input Arguments

collapse all

Observer model, specified as a string, character vector, or double. Use a string or character vector to specify the name of the Observer model or use a double to specify the handle of the Observer model.

Output Arguments

collapse all

System model that contains the elements observed by the Observer Port blocks in the Observer model, returned as a double data type model handle.

Version History

Introduced in R2024b