MATLAB: How to visualize physical data logged by Simscape

plotSimscapestatestroubleshoot

I log data from my Simscape simulation to help me debug my simulation. Is there a simple way to visualize this information?

Best Answer

Logged data can be visualized using the Simscape Simulation Results Viewer available from MATLAB Central. Download this into a location on your MATLAB path.
To log simulation data in a Simscape model, open the Configuration Parameters dialog for the model. Selecting Simscape to access the Data Logging pane.
After running a simulation, the logged data will be available in the MATLAB workspace as a simscape.logging.Node object.
Run the Simscape Simulation Results Viewer with the following syntax
ssc_explore(simlog)
where simlog is the name of the simscape.logging.Node object in the MATLAB workspace.
Related Question