xPC Target    

Getting the Value of a Target Object Property

You can list a property value in the MATLAB window, or assign that value to a MATLAB variable. With xPC Target you can use either a function syntax or an object property syntax.

The syntax get(target_object, property_name) can be replaced by

For example, to access the start time:

  1. In the MATLAB window, type
  2. Alternatively, you could type

Signals are also target object properties. For example, to get the value of the Integrator1 signal from the model xpcosc:

  1. In the MATLAB window, type
  2. Alternatively, you could type

To get a list of readable properties, type target_object. Without assignment to a variable, the property values are listed in the MATLAB window.


  Setting Target Object Properties from the Target PC Using the Method Syntax with Target Objects