DSP Blockset
  Go to block:
    Search    Help Desk 
User-Defined Frame Scope    Examples   See Also

Display frame-based data.

Library

DSP Sinks

Description

The User-Defined Frame Scope block is similar to the Time Frame Scope, but is not limited to plotting time-domain data. For a complete discussion of this block's axis properties, line properties, scope window, and frame-based operation, see the Time Frame Scope block reference.

The block does not make any assumptions about the nature of the data in the input frame. In particular, it does not assume that it is time-domain or frequency-domain data. The dialog box parameters give you complete freedom to plot the data in the most appropriate manner.

The scope updates the display for each new input frame. At any one time, the number of sequential frames displayed on the scope specified by the Horizontal display span parameter, S. Setting S=1 plots the current input frame's data across the entire width of the scope. Setting S to a larger number allows you to see a broader section of the input by fitting more frames of data into the display region. A single frame is the smallest unit that can be displayed, so S cannot be less than 1.

In order to correctly scale the horizontal axis, the block needs to know the spacing of the data in the input. This is specified by the Increment per sample in input frame parameter, Is, which represents the numerical interval between adjacent x-axis points corresponding to the input data. For example, an input signal sampled at 500 Hz has an increment per sample of 0.002 seconds. The actual units of this interval (seconds, meters, Volts, etc.) are not needed for axis scaling.

A value of -1 for this parameter instructs the block to compute the horizontal interval between samples in the input frame from the frame period of the input. For example, if the input frame period is 1, and there are 64 samples per input frame, the interval between samples is computed to be 1/64. Allowing the block to auto-compute the interval this way is usually only valid if:

In other cases, the frame rate and frame size do not provide enough information for the block to correctly scale the x-axis, and you should specify the appropriate value for the Increment per sample in input frame parameter. The range of the horizontal axis is [0,M*Is*S], where M is the number of samples in each consecutive input frame.

Dialog Box

X-Axis title 
The text to be displayed below the x-axis.
Increment per sample in input frame 
The numerical interval, Is, between adjacent x-axis points corresponding to the input data.
Y-Axis title 
The text to be displayed to the left of the y-axis.
Horizontal display span
The number of consecutive input frames, S, to display (horizontally) on the scope at any one time.
Number of input channels
The number of channels (columns) in the input matrix, N.
Axis properties 
Select to expose the Axis Properties panel. See Time Frame Scope for more information.
Line properties 
Select to expose the Line Properties panel. See Time Frame Scope for more information.

Examples

One possible application of the User-Defined Frame Scope is plotting the histogram distribution of a signal. For example, the simple model below lets you view a histogram computed over sections of the mtlb signal.

The block parameters are set as follows:

The value of the Increment per sample in input frame parameter is the distance between histogram bins,

where BM is the Maximum value of input, Bm is the Minimum value of input, and n is the Number of bins. See Histogram for more about these parameters.

To run the simulation, load the signal into the workspace by typing

and set the Stop time parameter in the Simulation Parameters dialog box to 1000 (select Parameters from the Simulation menu).

Start the simulation. After a moment you should see the scope window below appear and update until the end of the simulation.

Right-click with the mouse and select Autoscale to better fit the data to the scope window. Run the simulation again. You should see the scope below. Deselect Axis zoom from the right-click menu to see the axis titles.

Note that although the spacing of the bins is correct, the bin values are not. This is because the first bin is placed at zero by default. The actual bin centers are located at

or

See Also

FFT Frame Scope
Frequency Frame Scope
Time Frame Scope


[ Previous | Help Desk | Next ]