Derepeat - Reduce sampling rate by averaging consecutive samples

Library

Sequence Operations

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 Signal Processing Blockset Repeat block. The positive integer N is the Derepeat factor parameter in the Derepeat dialog.

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. The block can accept the data types single and double. The data type of the output will be the same as that of the input signal.

This block will work within a triggered subsystem, as long as it is used in the single-rate mode.

Sample-Based Operation

If the input is sample-based, and Framing is set to Maintain input size, 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. If Framing is set to Maintain input rate, the block will generate an error message.

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:

Dialog Box

Derepeat factor, N

The number of consecutive input samples to average in order to produce each output sample.

Framing

For frame-based operation, the method by which to reduce the amount of data. One method decreases the frame rate while maintaining frame size, while the other decreases the frame size while maintaining frame rate.

Initial condition

The value with which to initialize the block.

See Also

Repeat (Signal Processing Blockset documentation), Downsample (Signal Processing Blockset documentation)

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS