removeHighlighting
Remove highlighting of active states
Syntax
Description
Examples
Modify Operating Point Information for State Activity
Open the
sf_car
model.openExample("sf_car")
For more information about this model, see Simulate Chart as a Simulink Block with Local Events.
Set the model to save the final operating point. Open the Configuration Parameters dialog box and, in the Data Import/Export pane:
Select Final states and enter a name for the operating point. For this example, use
xSteadyState
.Select Save final operating point.
Click OK.
Set the stop time for this simulation segment. In the Simulation tab, set Stop Time to
3
.Run the simulation.
Access the
Stateflow.op.BlockOperatingPoint
object that contains the operating point information for theshift_logic
chart.blockpath = "sf_car/shift_logic"; op = get(xSteadyState,blockpath)
op = Block: "shift_logic" (handle) (active) Path: sf_car/shift_logic Contains: + gear_state "State (AND)" (active) + selection_state "State (AND)" (active) gear "State output data" gearType [1, 1] down_th "Local data" double [1, 1] up_th "Local data" double [1, 1] datasetWrittenToVector "Data set written to vector" logical 4x1
Access the
Stateflow.op.OperatingPointContainer
object that contains the operating point information for thegear_state
state.op.gear_state
ans = State: "gear_state" (handle) (active) Path: sf_car/shift_logic/gear_state Contains: + first "State (OR)" (active) + fourth "State (OR)" + second "State (OR)" + third "State (OR)"
Highlight the states that are active in the chart at t = 3.
highlightActiveStates(op)
Change the substate activity in the state
gear_state
state to reflect a change in gear.setActive(op.gear_state.second)
Verify that the substate
second
in the stategear_state
is active in the modified operating point.isActive(op.gear_state.second)
ans = logical 1
Remove the highlighting of active states in the Stateflow Editor.
removeHighlighting(op)
Input Arguments
op
— Operating point for chart
Stateflow.op.BlockOperatingPoint
object
Operating point for a Stateflow chart, specified as a Stateflow.op.BlockOperatingPoint
object.
Version History
Introduced in R2009b
See Also
Objects
Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)