reflect: Reflect and extend a vector.

reflectR Documentation

Reflect and extend a vector.

Description

Extends the vector to have length a power of 2 (if not already a power of 2) and then reflects it about its right end.

Usage

reflect(x)

Arguments

x

An n-vector.

Details

The vector x is first reflected about both its left and right ends, by (roughly) the same amount each end, to make its length a power of 2 (if the length of x is already a power of 2 this step is skipped). Then the resulting vector is reflected about its right end to create a vector that is both circular (left and right ends are the same) and a power of 2.

Value

A list with two list elements: "x" containing the extended-and-reflected signal; and "idx" containing the indices of the original signal.


zrxing/smash documentation built on July 12, 2024, 6:31 a.m.