Viewers
Viewers are types of blocks for displaying particular results during the simulation of a model. Viewers include scope blocks and the Display block.
Scopes
Scopes are blocks that you can include in a model for plotting and monitoring simulation results.
When to Use Scope Blocks
You connect a scope block to each signal in a model that you want to review. In the following example of a classic predator-prey model, Scope_2 on the right of the diagram is defined to plot the evolution of population over time:
Scope Plots
Display Scope Plots
After running a simulation, a plot appears in a floating window for each scope block in the model. You can close the plots, make modifications to the scope blocks, and reopen the plots from the Project Browser or directly from the scope block.
Add Titles and Legends to Scope Plots
Add a header, footer or legend on a plot generated from a scope block.
Display Block
The Display block exposes a specified value during a simulation. Just like a scope block, you can connect the Display block to any signal.
The following example shows a diagram of a predator-prey model. A Display block is connected to the right of the diagram and is defined to display a population value. The Display block updates as the population evolves during the course of a simulation. The value highlighted in the figure is the last value at the final time of a simulation run.
The Display block can also display vectors and matrices. The example below is from the Extended Definitions and shows in the green block the optimal gear box ratios obtained after optimization: