| DSP Blockset | Search  Help Desk |
| Edge Detector | See Also |
Detect a transition of the input from zero to a nonzero value.
Library
Switches and Counters, in General DSPDescription
The Edge Detector block outputs a unit pulse (1) when the input transitions from zero to a nonzero value. Otherwise, the block outputs zeros at the same rate as the input.
The Frame-based inputs parameter allows you to choose between sample-based and frame-based operation
Sample-Based Operation
When the check box is not selected (default), the block assumes that the input is a scalar, a 1-by-N sample vector, or M-by-N sample matrix. A scalar sequence represents a single channel, as shown above. For a vector or matrix input, each of the N vector elements or M*N matrix elements is treated as an independent channel, and the block tracks the edges in each channel over time. The input and output sizes are identical.Frame-Based Operation
The Number of channels parameter specifies the number of independent channels (columns), N, in the matrix, and the block tracks the edges in each channel independently over time. An edge that is split across two consecutive frames (i.e., a zero at the bottom of the first frame, and a nonzero value at the top of the following frame) is counted in the frame that contains the nonzero value. The input and output sizes are identical.
Frame-based operation provides substantial increases in throughput rates, at the expense of greater model latency.
Dialog Box

See Also
Counter