grays: Generate gray code

Description Usage Arguments Value Author(s) References Examples

Description

A function to generate gray code

Usage

1
grays(n)

Arguments

n

an integer to specify the number of bits.

Value

a vector of the decimal gray code.

Author(s)

Liye He liye.he@helsinki.fi

References

Dah jyh Guan. (Scientific Note) Generalized Gray Codes with Applications. 1998

Examples

1
code<-grays(3)

Example output



timma documentation built on May 2, 2019, 1:10 p.m.