Main Content

About theSimscapeResults 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 theOpen viewer after simulationcheck box in the Configuration Parameters dialog box. For more information on this workflow, seeLog, Navigate, and Plot Simulation Data.

Another way to open the Simscape Results Explorer window is to right-click a block and, from the context menu, selectSimscape>View simulation data. For more information, seeLog 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, seeFrequency and Time Simulation Mode.

  • To select several variables for side-by-side plot comparison, press CTRL and click multiple nodes.

Link toMATLABSession

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 thebutton located in the toolbar above the left pane. The button appearance changes toand, when the new window opens after simulation, that window will be 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 itsbutton) 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 theVariablestab in the corresponding block dialog box.

When you select a node in the Simscape Results Explorer tree, the status panel in the bottom-left corner of the window 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 on theVariablestab in the block dialog box. Clicking the link opens the corresponding block dialog box.

    For example, in the illustration above, the selected nodewrepresents a variable calledRotational velocity. Clicking theDescriptionlink opens the Inertia block dialog box, which is the parent block for this variable. In the block dialog box, click theVariablestab to see theRotational velocityvariable.

  • 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 theSourcelink opens the DC Motor subsystem and highlights the Inertia block, which is the parent block for the selected nodew.

Tip

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, theResistor Arrayblock contains an underlying array of resistors.

这个模型模拟时,Simscape结果Explorer tree includes nodes for the numbered array members, such asresistor(1),resistor(2), and so on. If the component array size is1xN, the members are numberedcomp(1), …,comp(N). If the array size isNxM, the members are numberedcomp(1,1),comp(1,2), …,comp(NxM).

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.

See Also

Related Topics