DSP Blockset
  Go to block:
    Search    Help Desk 
Repeat    See Also

Repeat the input sample a specified number of times.

Library

Signal Operations, in General DSP

Description

The Repeat block upsamples the input signal by repeating each consecutive input sample L times at the output, where L is specified by the Repetition count parameter. 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 1-by-N sample vector or M-by-N sample matrix. Each of the N vector elements (or M*N matrix elements) is treated as an independent channel, and the block repeats the value in each channel L times at the output. The output sample rate is L times higher than the input sample rate, and the input and output sizes are identical.

In sample-based mode, the Initial condition parameter specifies the value of the first L output samples, and can be a vector containing one value for each channel, or a scalar to be applied to all signal channels.

Frame-Based Operation

When the Frame-based inputs check box is selected, the block assumes that the input is an M-by-N frame matrix. Each of the N frames in the matrix contains M sequential time samples from an independent signal. The illustration below shows a 6-by-4 matrix input:

The Number of channels parameter specifies the number of independent channels (columns), N, in the matrix. Frame-based operation provides substantial increases in throughput rates, at the expense of greater model latency.

In frame-based operation, the block upsamples each channel independently by repeating each row in the input matrix L times at the output. The Framing parameter determines how the block adjusts the rate at the output to accommodate the repeated rows. There are two available options:

In frame-based mode, the Initial condition can be an M-by-N matrix representing the initial input, or a scalar to be repeated across all elements of the M-by-N matrix. The first row of the matrix is repeated at the output for the first L sample times, the second row is repeated for the next L sample times, and so on.

Dialog Box

Repetition count
The number of times, L, that the input value is repeated at the output. This is the factor by which the output frame size or sample rate is increased.
Initial conditions
The value that the block is initialized with; a scalar or vector in sample-based mode, or a scalar or matrix in frame-based mode. This value (first row in frame-based mode) is repeated at the output for the first L sample times.
Frame-based inputs
Selects frame-based operation.
Number of channels
For frame-based operation, the number of columns (channels) in the input matrix.
Framing
For frame-based operation, the method by which to implement the repetition (upsampling): increase the output sample rate, or increase the output frame size.

See Also

FIR Interpolation
Upsample
Zero Pad


[ Previous | Help Desk | Next ]