Determine whether operating point data contains private data elements
hasPrivateData( returns true
1) if the operating point data tree contains elements
corresponding to the Simscape™ language file members with the attribute
none. Returns false (
0) if the operating point does
not contain private data.
Simscape language members with the attribute
none are not observable by definition. Therefore, you cannot see them
in the operating point data, but their inclusion helps restore the simulation state
of the model during initialization.
When you create an operating point by extracting it from a model or from logged simulation data, private data is included by default.
In general, including private data in an operating point data
tree helps with model initialization. However, if you are having trouble
initializing a model from a saved operating point and wonder whether the issue
is in the hidden private data, try using
to remove the hidden elements.
Open the Permanent Magnet DC Motor example model and create an
OperatingPoint object named
Start values from the model:
ssc_dcmotor op = simscape.op.create(gcs, 'Start')
op = OperatingPoint with children: OperatingPoints: ChildId Size ______________ ____ 'DC Motor' 1x1 'DC Voltage' 1x1 'ERef' 1x1 'Load Torque' 1x1 'MRRef Motor' 1x1 'MRRef Torque' 1x1 'Sensing' 1x1 'Step Input' 1x1
Determine whether the operating point contains private data:
ans = logical 1
Create a new operating point,
op1, by removing private
op1 = removePrivateData(op)
op1 = OperatingPoint with children: OperatingPoints: ChildId Size ______________ ____ 'DC Motor' 1x1 'DC Voltage' 1x1 'ERef' 1x1 'Load Torque' 1x1 'MRRef Motor' 1x1 'MRRef Torque' 1x1 'Sensing' 1x1 'Step Input' 1x1
Verify that the new operating point does not contain private data:
ans = logical 0
op— Operating point
Operating point in the workspace, specified as an