View Data During Simulation
Scope blocks and scope viewers offer a quick way to visualize simulation data over time. If you are prototyping a model, connect signals to a Scope block, simulate the model, and then view the results in a scope window. Use the results to validate your design. If you need to debug your model, use oscilloscope-like tools in the Scope, such as triggers and cursor measurements, to locate the problem. To learn more, seePrototype and Debug Models with Scopes.
Blocks
Scope | 显示在模拟过程中生成的信号 |
Scope Viewer and Floating Scope | 显示在模拟过程中生成的信号without signal lines |
Record | Log data to the workspace, to a file, or both |
Objects
Scope Configuration |
Control Scope block appearance and behavior |
Tools
Simulation Data Inspector | Inspect and compare data and simulation results to validate and iterate model designs |
Functions
Simulink.sdi.addTrigger |
Add trigger to signal to control display updates in the Simulation Data Inspector |
Simulink.sdi.getTrigger |
Get signal and trigger options for trigger configured in the Simulation Data Inspector |
Simulink.sdi.removeTrigger |
Remove trigger from signal in the Simulation Data Inspector |
Simulink.sdi.setRecordData |
Specify record mode for logging |
Simulink.sdi.getRecordData |
Check record mode for logging |
Topics
- Common Scope Block Tasks
Step-by-step procedures of common scope tasks, including logging data, sharing scope images, and display manipulation.
- Floating Scope and Scope Viewer Tasks
Step-by-step procedures for frequently carried out Floating Scope block and Scope viewer tasks.
- Control Scope Blocks Programmatically
This example shows how to control scopes with programming scripts.
- Sample Time with Scope Blocks
理解继承在使用样品时间Scope and Time Scope blocks.
- Decide How to Visualize Simulation Data
Choose the right visualization technique for each modeling and simulation task.
- Scope Blocks and Scope Viewer Overview
Choices about how to display simulation results graphically.
- Prototype and Debug Models with Scopes
Prototype and debug models by using scopes and scope measurements.
- Viewers and Generators Manager
Generate and visualize signals without blocks.
- Generate Signals Without Source Blocks
Step-by-step procedures for attaching, modifying, and removing signal generators.
- Control Display of Streaming Data Using Triggers
Use triggers in the Simulation Data Inspector to control when plot displays update to display new data.
- Access Data in a MATLAB Function During Simulation
Stream signal data to a MATLAB®callback function during simulation for processing and visualization.