About the Simscape Results Explorer
Simscape™ Results Explorer is an interactive tool that lets you navigate and plot the simulation data logging results.
When you configure the model to log simulation data (for the whole model or just the selected blocks), you can make the Simscape Results Explorer window open automatically upon completing a simulation run by selecting the Open viewer after simulation check box in the Configuration Parameters dialog box. For more information on this workflow, see Log, Navigate, and Plot Simulation Data.
Other ways to open the Simscape Results Explorer window are:
In the model window, on the Simulation tab, click Review Results > Results Explorer.
Select a Simscape block in the model, and then, on the Simscape Block tab, click Review Results > Results Explorer.
Right-click a block and, from the context menu, select Simscape > View simulation data. For more information, see Log and View Simulation Data for Selected Blocks.
Selecting Nodes to Plot Data
When you click a node in the left pane of the Simscape Results Explorer, the corresponding plots appear in the right pane:
Clicking a node that represents a block displays plots of all the variables in this block.
Clicking a node that represents a variable displays the plot for this variable only.
In frequency-and-time simulation mode, clicking a node that represents a frequency variable displays the plots for this variable's instantaneous value, amplitude, offset, and phase. You can click each of the subnodes to see that data separately. For more information, see Frequency and Time Simulation Mode.
To select several variables for side-by-side plot comparison, press CTRL and click multiple nodes.
Link to MATLAB Session
You can control whether the Simscape Results Explorer window is reused when you rerun the simulation, or a new window is opened after the next simulation run, by linking and unlinking the window.
When you first open the Simscape Results Explorer window, it is linked to the current MATLAB® session. This means that when you run a new simulation, the results in the window will be overwritten. To retain the current results and open a new window after the next simulation, click the Linked button in the Simscape Results Explorer window toolbar. The button changes to Unlinked, meaning that this window is now unlinked from simulation. Next time you rerun a simulation or use an option to view the simulation data in the Simscape Results Explorer, a new window opens, and that window is now linked to the session.
Only one window can be linked to the session, so if you have multiple windows open, linking one of them (by clicking its Unlinked button) unlinks the previous one.
Link to Block Diagram
The Simscape Results Explorer tool provides direct linking to the block diagram. These links let you highlight the appropriate block or open the block dialog box, to easily go from a variable listed in the Simscape Results Explorer tree to the Initial Targets section in the corresponding block dialog box.
When you select a node in the Simscape Results Explorer tree, the Node Statistics panel in the bottom-left corner of the window is collapsed by default. When you expand this panel, it contains the following links:
Description — If the node represents a block or subsystem, displays the block or subsystem name. If the node represents a variable, displays the descriptive variable name, which is the same name that appears in the Initial Targets section of the block dialog box. Clicking the link opens the dialog box for the corresponding block.
For example, in the illustration above, the selected node
wrepresents a variable called
Rotational velocity. Clicking the Description link opens the Inertia block dialog box, which is the parent block for this variable. In the block dialog box, expand the Initial Targets section to see the Rotational velocity variable.
Source — If the node represents a variable, displays the name of the parent block for this variable. Clicking the link highlights the corresponding block in the block diagram, opening the appropriate subsystem if needed.
In the same example, clicking the Source link opens the DC Motor subsystem and highlights the Inertia block, which is the parent block for the selected node
If the descriptive name of a variable or block is too long to fit into the status
panel, it is truncated with an ellipsis (
…). If you hover over the
truncated name, the tooltip for the status panel displays the entire descriptive name.
Data Logging for Component Arrays
If your model contains blocks with underlying arrays of components, the Simscape Results Explorer includes logged simulation data for the array members.
For example, in this model, the Resistor Array block contains an underlying array of resistors.
When you simulate this model, the Simscape Results Explorer tree includes nodes for the numbered array members, such as
resistor(2), and so on. If the
component array size is
1xN, the members are numbered
comp(N). If the array size is
NxM, the members are numbered
Unlike regular blocks, clicking a node that represents a block with an underlying array of components does not display any plots. Click a node that represents an individual array member to see plots of all of its variables.