在仿真期间查看数据
Scope 模块和波形查看器为可视化随着时间而改变的仿真数据提供了一种便捷方法。如果您正在为模型建立原型,则可以将信号连接到 Scope 模块、仿真该模型,然后在 Scope 窗口中查看结果。使用结果来验证您的设计。如果您需要调试模型,可以使用 Scope 中类似于示波器的工具(如触发器和游标测量)来定位问题。要了解详细信息,请参阅Prototype and Debug Models with Scopes。
模块
Scope | 显示仿真过程中生成的信号 |
Floating Scope and Scope Viewer | 显示仿真过程中生成的信号,无信号线 |
Record | Log data to the workspace, to a file, or both (自 R2021a 起) |
对象
TimeScopeConfiguration | 控制 Scope 模块的外观和行为 |
工具
仿真数据检查器 | 检查并比较数据和仿真结果,以验证和迭代模型设计 |
函数
Simulink.sdi.addTrigger | Add trigger to signal to control display updates in the Simulation Data Inspector (自 R2020b 起) |
Simulink.sdi.getTrigger | Get signal and trigger options for trigger configured in the Simulation Data Inspector (自 R2020b 起) |
Simulink.sdi.removeTrigger | Remove trigger from signal in the Simulation Data Inspector (自 R2020b 起) |
Simulink.sdi.setRecordData | Specify record mode for logging (自 R2021a 起) |
Simulink.sdi.getRecordData | Check record mode for logging (自 R2021a 起) |
主题
- 常见的示波器模块任务
常见示波器任务的逐步过程,这些任务包括记录数据、共享示波器图像和显示画面操作。
- View Values of Parameters Set as Variables
Evaluate parameters defined as variables or variable expressions while editing a model and during simulation.
- Floating Scope 和波形查看器任务
执行常见的 Floating Scope 模块和波形查看器任务时的分步操作。
- Control Scope Blocks Programmatically
This example shows how to control scopes with programming scripts.
- Sample Time with Scope Blocks
Understand sample time inheritance when using the Scope and Time Scope blocks.
- 决定如何可视化仿真数据
为每个建模和仿真任务选择正确的可视化方法。
- Scope 模块和波形查看器概述
有关如何以图形方式显示仿真结果的选项。
- 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.
- View Streaming Data in the Simulation Data Inspector
Control the time axis, display scaling, and display offset while data is streaming in the Simulation Data Inspector.
- 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 MATLAB Function During Simulation
Stream signal data to a MATLAB® callback function during simulation for processing and visualization.