Documentation

simscape.op.Target

Variable initialization target object

Description

OperatingPoint objects let you save sets of data necessary to initialize a model, manipulate this data, and then use it to initialize another model, or the same model before another simulation run. These sets of data contain a hierarchy of operating point Target objects, each target consisting of a variable value, unit, and initialization priority.

Creation

Syntax

t = simscape.op.Target()
t = simscape.op.Target(value)
t = simscape.op.Target(value, unit)
t = simscape.op.Target(value, unit, priority)

Description

example

t = simscape.op.Target() creates an empty Target object.

example

t = simscape.op.Target(value) creates a Target object with the Value property set to provided value.

example

t = simscape.op.Target(value, unit) creates a Target object with the Value property set to provided value and the Unit property set to provided unit expression.

example

t = simscape.op.Target(value, unit, priority) creates a Target object with the Value property set to provided value, he Unit property set to provided unit expression, and the Priority property set to provided variable initialization priority.

Properties

expand all

Variable initialization target value, specified as a scalar, vector, or matrix.

Example: 1.5

Data Types: double | int32

Physical unit expression, specified as a character vector. The expression can consist of valid physical unit names, numbers, math operators, such as +, -, *, /, and ^, and parentheses to specify the order of operations.

Example: 'm/s^2'

Data Types: char

Variable initialization priority, specified as 'High', 'Low', or 'None'.

Data Types: char

Descriptive name of target variable, specified as a character vector. If you create an operating point by extracting data from log or model, the extraction algorithms populate this target property with the user-friendly description of the variable. However, you do not have to set this property to be able to use the target for model initialization.

Examples

expand all

Create an empty OperatingPoint object named op:

op = simscape.op.OperatingPoint
op = 

  OperatingPoint with no children.

Create a Target object named t, consisting of a variable value, unit, and initialization priority:

 t = simscape.op.Target(1.5, 'V', 'High')
t = 

  Target with properties:

    Description: ''
          Value: 1.5000
           Unit: 'V'
       Priority: 'High'
     Attributes: [0×1 containers.Map]

Add the target t to the operating point op by assigning this target to the variable named v0:

op = set(op, 'v0', t)
op = 

  OperatingPoint with children:
  -----------------------------
   v0  1.5000|'V'  High
  -----------------------------

You can create other Target objects or OperatingPoint objects and add them as children to the operating point op.

Introduced in R2017b

Was this topic helpful?