Reorder the elements of the input vector in digit-reversed order.
digitrevorder(x, r, index.return =FALSE)
Arguments
x: input data, specified as a vector. The length of x must be an integer power of r.
r: radix base used for the number conversion, which can be any integer from 2 to 36. The elements of x are converted to radix r and reversed.
index.return: logical indicating if the ordering index vector should be returned as well. Default FALSE.
Returns
The digit-reversed input vector. If index.return = TRUE, then a list containing the digit-reversed input vector (y, and the digit-reversed indices (i).
Details
This function is useful for pre-ordering a vector of filter coefficients for use in frequency-domain filtering algorithms, in which the fft and ifft transforms are computed without digit-reversed ordering for improved run-time efficiency.