The function gray2bin2 converts a gray-coded integer to a binary-coded number.
The conversion function is performed according to the algorithm given by Chakraborty and Janikov (2003).
Usage
gray2bin2(gray)
Arguments
gray
A gray coded number.
Value
Returns the binary coded integer equivalent of the input number.
Details
To convert gray coded numbers to binary numbers, a conversion function is defined using the algorithm given by Chakraborty and Janikov (2003). This function is a generic function that does not use the xor operator.
References
Chakraborty, U.K., and Janikow C.Z. (2003). An analysis of Gray versus binary encoding in genetic search. Information Sciences, 156 (3-4), 253-269.