Main Content

Prototype and Debug Models with Scopes

Simulink® scope blocks and viewers offer a quick and lightweight way to visualize your simulation data over time. If you are prototyping a model design, you can attach signals to a Scope block. After simulating the model, you can use the results to validate your design. See Scope Blocks and Scope Viewer Overview and Model and Validate a System.

Model that is validating simulation results using a Scope block to view the data.

A Scope block or Scope viewer opens to a Scope window where you can display and evaluate simulation data.

Scope window with plotted simulation data.

The toolbar contains controls for starting, stopping, and stepping forward through a simulation Simulation controls. You can use these controls to debug a model by viewing signal data at each time interval. See How Stepping Through Simulation Works.

Connect signal lines to a Scope block using multiple input ports, see Number of input ports.

Model with a scope block that has multiple input ports.

Attach signals to a Floating Scope block or signal viewer directly from the model. See Add Signals to an Existing Floating Scope or Scope Viewer.

Combined images of the Signal Selector button and the connection mode and menu in the Simulink canvas.

Use the oscilloscope-like tools available with a scope to debug your model. Set triggers to capture events, use interactive cursors to measure signal values at various points, and review signal statistics such as maximum and mean values. See Scope Triggers Panel and Cursor Measurements Panel.

Scope window showing plotted data and the measurements panels.

Save or log signal data to the MATLAB® workspace, and then plot data in a MATLAB figure widow. Use MATLAB functions or your own scripts to analyze the data. See Save Simulation Data from Floating Scope.

Scope window and scope configuration properties window.

See Also

| |

Related Topics