MATLAB Examples

Investigate Highlighted Model Slice by Using Model Slicer Data Inspector

This example shows how to investigate and refine the highlighted model slice by using the Model Slicer Data Inspector.

In the fault-tolerant fuel control system, the control_logic controls the fueling mode of the engine. In this example, you slice the fuel_rate_control referenced model. Then, investigate the effect of fuel_rate_ratio on the Fueling_mode of the engine. For more information, see docid:stateflow_examples.example-sldemo_fuelsys.


Step 1: Start the Model Slice Manager

To start the Model Slice Manager, open the fuel_rate_control model, and select Analysis > Design Verifier > Model Slicer.


To select the starting point, open the fuel_rate_control model, and add the fuel-rate port and the fuel_mode output signal as the starting point. To add a port or a signal as a starting point, right-click the port or signal, and select Model Slicer > Add as a starting point.

Step 2: Log input and output signals

a. In the Model Slice Manager dialog box, select the Simulation time window and Run simulation.

b. In the Record simulation time window, for the Stop time, type 20.

c. Select the Log inputs and outputs of the starting points.

d. Click OK.

Step 3: Inspect signals

To open the Model Slicer Data inspector, click Inspect Signals.

The logged input and output signals appear in the Model Slicer Data Inspector. You can select the time window by dragging the data cursors to a specific location or by specifying the Start and Stop time in the navigation pane. To highlight the model for the defined simulation time window, Click Highlight.

To investigate the Fueling_mode, open the control_logic Stateflow™ chart, available in the fuel_rate_control referenced model. Select the time window for 13–15 seconds and click Highlight. For the defined simulation time window, the Low_Emissions fueling mode is active and highlighted.

Select the data cursor for the time window 6–7.5 seconds, with 0 fuel_cal:1. Click Highlight. In the control_logic model, the Fuel_Disabled state is highlighted. The engine is in Shutdown mode.