When you display logged simulation data in Simscape™ Results
Explorer, the data along the
always time, in seconds. However, you can change the
units directly on the plot.
Each of the plots has a drop-down arrow next to the unit name
y-axis. When you click this arrow,
a context menu appears containing names of all the units in the unit
registry that are commensurate with the current plot unit, as well
as two other options:
Default — Use the
Specify — Type the
unit name or expression in a pop-up window and click OK.
The specified unit name or expression must be commensurate with the
current plot unit.
Once you select the option you want, the drop-down menu collapses and the plot is redrawn in specified units.
This example shows how you can plot the data in different units by selecting the unit interactively in the plot pane.
Open the Permanent Magnet DC Motor example model by
the MATLAB® Command Window. This example model has data logging
enabled for the whole model, with the Workspace variable
name parameter set to
Simulate the model to log the simulation data.
Open the Simscape Results Explorer window and plot the rotational velocity of the Inertia block:
By default, Simscape Results Explorer plots rotational velocity in rad/s.
To plot data in different units, click the arrow under
the unit name and then, from the context menu, select
The rotational velocity plot is redrawn in rpm.