get

Access element of operating point data tree

Description

example

opElement = get(op, opPath) returns a copy of a node associated with the specified path opPath in the operating point op data tree. Depending on the path, the element can be either an OperatingPoint object or a Target object.

Examples

collapse all

Open the Permanent Magnet DC Motor example model and create an OperatingPoint object named op using the Start values from the model:

ssc_dcmotor
op = simscape.op.create(gcs, 'Start')
op = 

  OperatingPoint with children:
  -----------------------------
   DC Motor
   DC Voltage
   ERef
   Load Torque
   MRRef Motor
   MRRef Torque
   Sensing
  -----------------------------

Open the DC Motor subsystem, select the Inductor block, and find the relative path to this block in the operating point data hierarchy:

 relPath = relativePath(op, gcb)
relPath =

    'DC Motor/Rotor Inductance'

Copy the block data into a new operating point, opRI:

opRI = get(op, relPath)
opRI = 

  OperatingPoint with children:
  -----------------------------
   i    1.5000e-09|'A'  None
   i_L           0|'A'  High
   v        1.5000|'V'  None
  -----------------------------
   n
   p
  -----------------------------

Input Arguments

collapse all

Operating point in the workspace, specified as an OperatingPoint object, from which you are copying an element.

Location associated with the element to copy, specified as a slash-delimited character vector or string scalar. Define the location by the relative path through the data tree hierarchy of the operating point, op, starting below the root node. The root node is specified by the Identifier property of the OperatingPoint object. Separate the tree node names with slash symbols (/).

Example: 'DC Motor/Rotor Resistance'

Data Types: char | string

Output Arguments

collapse all

New OperatingPoint or Target object, which is a copy of the op element at the opPath location.

Introduced in R2017b