Determine fixed-point data type
nts
nts({'block',PORT})
nts({line-handle})
nts({gsl})
nts opens the NumericTypeScope window.
To connect to a signal in a Simulink® model, select the signal
and then, in the NumericTypeScope window, select File > Connect to Simulink Signal.
The NumericTypeScope suggests a fixed-point
data type in the form of a numerictype object based
on the dynamic range of the input data and the criteria that you specify
in the Bit Allocation Panel. The
scope allows you to visualize the dynamic range of data in the form
of a log2 histogram. It displays the data values
on the X-axis and the number or percentage of occurrences on the Y-axis.
Each bin in the histogram corresponds to a bit in a word. For example, 20 corresponds
to the first integer bit in the binary word, 2-1 corresponds
to the first fractional bit in the binary word.
nts({'block',PORT}) opens the NumericTypeScope window
and connects the scope to the signal output from block on
output port with index PORT. If the block has
more than one output port, you must specify the port index. The scope
cannot connect to more than one output port.
nts({line-handle}) opens the NumericTypeScope window
and connects the scope to the Simulink signal which has the line
handle specified in line-handle.
nts({gsl}) opens the NumericTypeScope window
and connects the scope to the currently selected Simulink signal.
You must select a signal in a Simulink model first, otherwise
the scope opens with no signal selected.
|
Full path to the specified block. |
|
Handle of the Simulink signal that you want to view with
the scope. To get the handle of the currently selected signal, at
the MATLAB® command line, enter |
|
Index of the output port that you want to view with the scope. If the block has more than one output port, you must specify the index. The scope cannot connect to more than one output port. |
The NumericTypeScope opens with the default toolbars displayed at the
top of the window and the dialog
panels to the right.

By default the scope displays a toolbar that provides these options:
| Button | Action |
|---|---|
| New NumericTypeScope. | |
Connect to Simulink signal. The scope connects to the
currently selected signal. If a block with only one output port is
selected and the Connect scope on selection of is
set to Signal lines or blocks, connects
to the output port of the selected block. For more information, see Sources Pane. |
After connecting the scope to a signal in a Simulink model, the scope displays an additional toolbar with the following options:
| Button | Action |
|---|---|
| Stop simulation | |
| Start simulation | |
| Simulate one step | |
| Snapshot. Freezes the display so that you can examine the results. To reenable display refreshing, click the button again. | |
| Highlight Simulink signal. | |
| Persistent. By default, the scope makes a persistent connection to the selected signal. If you want to view different signals during the simulation, click this button to make a floating connection. You can then select any signal in the model and the scope displays it. |
Use the NumericTypeScope configuration dialog
box to control the behavior and appearance of the scope window.
To open the Configuration dialog box, from the scope main menu, select File > Configuration > Edit, or, with the scope as your active window, press the N key.

For information about each pane, see Core Pane and Sources Pane.
To save configuration settings for future use, select File > Configuration > Save as. The configuration
settings you save become the default configuration settings for the NumericTypeScope.
Caution
Before saving your own set of configuration settings in the matlab/toolbox/fixpoint folder,
save a backup copy of the default configuration settings in another
location. If you do not save a backup copy of the default configuration
settings, you cannot restore these settings at a later time.
To save your configuration settings for future use, save them
in the matlab/toolbox/fixpoint folder with the
file name NumericTypeScopeSL.cfg. You can re-save
your configuration settings at anytime, but you must save them in
this folder with this filename.
The Core pane controls the general settings of the scope.
To open the Core - General UI Properties dialog box, select General UI and then click Properties.

Display the full source path in the title bar—Select this check box to display the full path to the selected block in the model. Otherwise, the scope displays only the block name.
To open the Core - Source UI Properties dialog box, select Source UI and then click Properties.

Keyboard commands respect source playback modes—Has no effect. The following table shows the keyboard shortcut mapping. You cannot disable this mapping.
| Action | Keyboard Shortcut |
|---|---|
| Open new NumericTypeScope | Insert |
| Change configuration | N |
| Display keyboard help | K |
| Play simulation | P |
| Pause simulation | Space |
| Stop simulation | S |
| Step forward | Right arrow, Page down |
Recently used sources list—Sets the maximum number of recently used sources displayed under the Files menu option.
The Sources pane controls how the scope connects to Simulink. You cannot disable the Simulink source.
To open the Sources - Simulink Properties dialog box, select the Sources tab and then click Properties.

Load Simulink model if not open—When selected, if you specify a signal in a Simulink model that is not currently open, the scope opens the model.
Connect scope on selection of—Connects
the scope only when you select signal lines or when you select signal
lines or blocks. If you select Signal lines or blocks,
the scope cannot connect to blocks that have more than one output
port.
The scope Bit Allocation panel provides options for specifying data type criteria. Adjust these criteria to observe the effect on suggested numerictype. For streaming data, the suggested numerictype adjusts over time in order to continue to satisfy the specified criteria.

You can:
Specify a known word length and signedness and, using Specify constraint, add additional constraints such as the maximum number of occurrences outside range or the smallest value that the suggested data type must represent.
Specify Integer length and Fraction length constraints so that the scope suggests an appropriate word length.
Set the Signedness and Word
length to Auto so that the scope
suggests values for these parameters.
Enable Graphical control and use the cursors on either side of the binary point to adjust the fraction length and observe the effect on the suggested numerictype on the input data. For example, you can see the number of values that are outside range, below precision, or both. You can also view representable minimum and maximum values of the changed suggested data type.
Specify extra bits for either the fraction length or the integer length. The extra bits act as a safety margin to minimize the risk of overflow and precision loss.
The scope Legend panel informs you which colors the scope uses to indicate values. These colors represent values that are outside range, in range, or below precision when displayed in the scope.

The Resulting Type panel describes the fixed-point data type as defined by scope settings. By manipulating the visual display (via the Bit Allocation panel or with the cursors), you can change the data type specification.

The Data Details section displays the percentage
of values that fall outside range or below precision with the numerictype object
located at the top of this panel. SQNR (Signal Quantization Noise
Ratio) varies depending on the signal. If the parameter has no value,
then there is not enough data to calculate the SQNR. When scope information
or the numerictype changes, the SQNR resets.
The Type Details section provides details
about the fixed-point data type. You can copy the numerictype specification
by right-clicking the Resulting Type pane and
then selecting Copy numerictype.
The Input Data panel provides statistical
information about the values currently displayed in the NumericScopeType.

Use the NumericTypeScope to help
you identify any values that are outside range or below precision
based on the current data type.
When the information is available, the scope indicates values that are outside range, below precision, and in range of the data type by color-coding the histogram bars as follows:
Blue — Histogram bin contains values that are in range of the current data type.
Red — Histogram bin contains values that are outside range in the current data type.
Yellow — Histogram bin contains values that are below precision in the current data type.
Select View > Vertical Units to select whether to display values as a percentage or as an actual count.
Use the View > Bring All NumericTypeScope Windows Forward menu option to manage your NumericTypeScope windows.
Selecting this option or pressing Ctrl+F brings all NumericTypeScope windows
into view.
hist | log2 | NumericTypeScope