(To be removed) View vectors of data over time
The Waterfall block will be removed in a future release. Use a different scope instead, see Scopes and Data Logging.
DSP System Toolbox / Obsolete Blocks

The Waterfall block displays multiple vectors of data at one time. These vectors represent the input data at consecutive sample times.
The data is displayed in 3D in the Waterfall window. By default, the x-axis represents amplitude, the y-axis represents samples, and the z-axis represents time. You can adjust the number of sample vectors that the block displays, move and resize the Waterfall window, and modify block parameter values during the simulation. The Waterfall window has toolbar buttons that enable you to zoom in on the displayed data, suspend the data capture, freeze the scope display, save the scope position, and export data to the workspace.
The toolbar buttons are labeled on the Waterfall window as it appears when you double-click a Waterfall block.

Port_1 — Signal or signals to visualizeThe Waterfall block accepts most numeric data types as input. However, the input is converted to double-precision before the block processes the data. The Waterfall block displays only real-valued, double-precision vectors of data.
Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | fixed point
You can control the display and behavior of the Waterfall window using the Parameters dialog box. To open the Parameters dialog box, click the Scope parameters button.
You can alter the Waterfall parameters while the simulation is running. However, when you make changes to values in text boxes, you must click Enter or click outside the text box for the block to accept your changes.
These parameters control the Waterfall display.
Display traces — Number of data vectors to displayUpdate interval — Number of vectors to storeNumber of vectors the block should store before it displays them to the window, specified as a positive integer.
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
UpdateInterval |
| Type: positive scalar specified as a character vector |
Colormap — Colors of displayautumn (default) | gray | hot | pink | jet | copper | red | whiteTransparency — Transparency of oldest and newest data vectorsTransparency of the oldest and newest data vectors, specified with the sliders. The leftmost position makes the data vector transparent. The rightmost position makes the data vector opaque. The intermediate data vectors transition between the two chosen transparency values.
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
TNewest and TOldest |
| Type: number between [0,1] specified as a character vector |
These parameters control the axes in the Waterfall window.
Axis color — Color of axes'w' (default) | colorspec character vectorColor of the axes, specified as a ColorSpec (Color Specification).
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
AxisColor |
| Type: character vector within a character vector |
Example:
set_param(block,'AxisColor',char("'b'")) |
These parameters control how many input data vectors the Waterfall block stores. They also control how the data is exported to the MATLAB® workspace.
History traces — Number of vectors to storeWhen the buffer is full — Behavior of full bufferOverwrite (default) | Suspend | ExtendUse this parameter to control the behavior of the block when the buffer is full:
Overwrite — The old data is replaced with
the new data.
Suspend — The block stops storing data in
the buffer; but the simulation continues to run.
Extend — The block extends the buffer so
that it can continue to store all the input data.
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
HistoryFull |
| Type: character vector |
Data logging — Export data from blockSelected (default) | All visible | All historyUse this parameter to control which data is exported from the block:
Selected — The selected data vector is
exported.
All visible — All of the data vectors
displayed in the Waterfall window are exported.
All history — All of the data vectors
stored in the history buffer of the block are exported.
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
ExportMode |
| Type: character vector |
Export variable — Variable name of exported dataExportData (default) | valid MATLAB variable nameExport at end of simulation — Automatically export dataoff (default) | onThese parameters control when the Waterfall block starts and stops capturing data.
Begin recording — When to start capturing dataImmediately (default) | After T seconds | After N inputs | User-definedThis parameter controls when the Waterfall block starts capturing data:
Immediately — The Waterfall window
captures the input data as soon as the simulation starts.
After T seconds — The Time,
T parameter appears in the dialog box. Enter the number of seconds
the block should wait before it begins capturing data.
After N inputs — The Count,
N parameter appears in the dialog box. Enter the number of inputs
the block should receive before it begins capturing data.
User-defined — The Function
name parameter appears in the dialog box. Enter the name of a
MATLAB function that defines when the block should begin capturing data.
For more information about how you define this function, see Scope Trigger Function.
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
TrigStartMode | TrigStartT |
TrigStartN | TrigStartFcn |
| Type: character vector |
Stop recording — When to stop capturing dataNever (default) | After T seconds | After N inputs | User-definedThis parameter controls when the Waterfall block stops capturing data:
Never — The block captures the input data
as long as the simulation is running.
After T seconds — The Time,
T parameter appears in the dialog box. Enter the number of seconds
the block should wait before it stops capturing data.
After N inputs —The Count,
N parameter appears in the dialog box. Enter the number of inputs
the block should receive before it stops capturing data.
User-defined — The Function
name parameter appears in the dialog box. Enter the name of a
MATLAB function that defines when the block should stop capturing data.
For more information about how you define this function, see Scope Trigger Function.
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
TrigStopMode | TrigStopT |
TrigStopN | TrigStopFcn |
| Type: character vector |
Re-arm trigger — When to capture dataNever (default) | After T seconds | After N inputs | User-definedThis parameter controls when the Waterfall block begins waiting to capture data.
Never — The Waterfall Scope block starts
and stops capturing data as defined by the Begin recording
and Stop recording parameters.
After T seconds — The Time,
T parameter appears in the dialog box. Enter the number of seconds
the block should wait before it begins waiting to capture data.
After N inputs — The Count,
N parameter appears in the dialog box. Enter the number of inputs
the block should receive before it begins waiting to capture data.
User-defined — The Function
name parameter appears in the dialog box. Enter the name of a
MATLAB function that defines when the block should begin waiting to
capture data. For more information about how you define this function, see Scope Trigger Function.
To enable this parameter, set Stop recording to
After T seconds, After N
inputs, or User-defined.
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
TrigRearmMode | TrigRearmT |
TrigRearmN | TrigRearmFcn |
| Type: character vector |
These parameters transform the input data to the Waterfall block. The result of the transform is displayed in the Waterfall window.
The block assumes that the input to the block corresponds to the
Transform parameter you select. For example, when you choose
Complex-> Angle, the block assumes that the input is
complex. But the block does not produce an error when the input is not complex. Therefore,
you must verify the format of your input data to guarantee that a meaningful result is
displayed in the Waterfall window.
Transform — Transformation to apply to inputNone (default) | Amplitude-> dB | Complex-> Mag Lin | Complex-> Mag dB | ...Choose a transform that you would like to apply to the input of the Waterfall block:
None — The input is displayed as it is
received by the block.
Amplitude-> dB — The block converts the
input amplitude into decibels.
Complex-> Mag Lin — The block converts
the complex input into linear magnitude.
Complex-> Mag dB — The block converts
the complex input into magnitude in decibels.
Complex-> Angle — The block converts
the complex input into phase.
FFT-> Mag Lin Fs/2 — The block takes
the linear magnitude of the FFT input and plots it from 0 to the Nyquist
frequency.
FFT-> Mag dB Fs/2 — The block takes the
magnitude of the FFT input, converts it to decibels, and plots it from 0 to the
Nyquist frequency.
FFT-> Angle Fs/2 — The block converts
the FFT input into phase and plots it from 0 to the Nyquist frequency.
Power-> dB — The block converts the
input power into decibels.
User-defined fcn — see Function.
User-defined expr — see Expression.
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
XFormMode |
| Type: character vector |
Function — Custom transformation functionabs (default)Enter a function that you would like to apply to the input of the Waterfall block. For more information about how you define this function, see Scope Transform Function.
To enable this parameter, set Transform to
User-defined fcn.
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
XFormFcn |
| Type: character vector |
Expression — Custom transformation expressionEnter an expression that you would like to apply to the input of the Waterfall block. The result of this expression must be real-valued. When you write the expression, be sure to include only one unknown variable. The block assumes this unknown variable represents the input to the block. When the block believes your expression is invalid, this window appears.

When you click No, your expression is not applied to the input. When you click Yes and your expression is invalid, your simulation stops and Simulink® displays an error.
To enable this parameter, set Transform to
User-defined expr.
Control this parameter from the command-line using set_param (Simulink) and get_param (Simulink).
Block Parameter:
XFormExpr |
| Type: character vector |
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Not recommended starting in R2020b
The Waterfall block will be removed in a future release. Use a different scope instead, see Scopes and Data Logging.
This block can be used for simulation visibility in systems that generate code, but is not included in the generated code.
This block can be used for simulation visibility in subsystems that generate HDL code, but is not included in the hardware implementation.
This block can be used for simulation visibility in systems that generate code, but is not included in the generated code.
This block accepts fixed-point input, but converts it to double for
display.
Spectrum Analyzer | Time Scope | Scope (Simulink)