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. The output is delayed by one output period, and the first output value is the Initial condition value.
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:
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.
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 | ![]() |