digitrevorder {gsignal} | R Documentation |
Permute input to digit-reversed order
Description
Reorder the elements of the input vector in digit-reversed order.
Usage
digitrevorder(x, r, index.return = FALSE)
Arguments
x |
input data, specified as a vector. The length of |
r |
radix base used for the number conversion, which can be any integer
from 2 to 36. The elements of |
index.return |
logical indicating if the ordering index vector should be
returned as well. Default |
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.
Value
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
).
Author(s)
Mike Miller.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.
See Also
Examples
res <- digitrevorder(0:8, 3)