Communications Blockset | ![]() ![]() |
Reduce sampling rate by averaging consecutive samples
Library
Sequence Operations, in Basic Comm Functions
Description
The Derepeat block resamples the discrete input at a rate 1/N times the input sample rate by averaging N consecutive samples. This is one possible inverse of the Repeat block (DSP Blockset). The positive integer N is the Derepeat factor parameter in the Derepeat mask.
The Initial condition parameter prescribes elements of the output when it is still too early for the input data to show up in the output. If the dimensions of the Initial condition parameter match the output dimensions, then the parameter represents the initial output value. If Initial condition is a scalar, then it represents the initial value of each element in the output.
The input can have any shape or frame status.
Sample-Based Operation
If the input is sample-based, then the block assumes that the input is a vector or matrix whose elements represent samples from independent channels. The block averages samples from each channel independently over time. The output period is N times the input period, and the input and output sizes are identical.
Frame-Based Operation
If the input is frame-based, then the block derepeats each frame, treating distinct channels independently. Each element of the output is the average of N consecutive elements along a column of the input matrix. The Derepeat factor must be less than the frame size.
The Framing parameter determines how the block adjusts the rate at the output to accommodate the reduced number of samples. The two options are:
The block reduces the sampling rate by using a proportionally longer frame period at the output port than at the input port. For derepetition by a factor of N, the output frame period is N times the input frame period, but the input and output frame sizes are equal.
For example, if a single-channel input with a frame period of 1 second is derepeated by a factor of 4, then the output has a frame period of 4 seconds. The input and output frame sizes are equal.
The block reduces the sampling rate by using a proportionally smaller frame size than the input. For derepetition by a factor of N, the output frame size is 1/N times the input frame size, but the input and output frame rates are equal. The Initial condition parameter does not apply to this option because the input data immediately shows up in the output.
For example, if a single-channel input with 64 elements is derepeated by a factor of 4, then the output contains 16 elements. The input and output frame periods are equal.
Dialog Box
See Also
Repeat (DSP Blockset), Downsample (DSP Blockset)
![]() | Deinterlacer | Descrambler | ![]() |