View source: R/digitrevorder.R
digitrevorder | R Documentation |
Reorder the elements of the input vector in digit-reversed order.
digitrevorder(x, r, index.return = FALSE)
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 |
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.
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
).
Mike Miller.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.
bitrevorder
, fft
, ifft
res <- digitrevorder(0:8, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.