Rdocumentation
powered by
Learn R Programming
timma (version 1.2.1)
grays: Generate gray code
Description
A function to generate gray code
Usage
grays(n)
Arguments
n
an integer to specify the number of bits.
Value
a vector of the decimal gray code.
References
Dah jyh Guan. (Scientific Note) Generalized Gray Codes with Applications. 1998
Examples
Run this code
code<-grays(
3
)
Run the code above in your browser using
DataLab