gc2dec

Function to convert a gray coded sequence to a decimal sequence.
2K Downloads
Updated 12 Aug 2005

No License

This function converts a gray coded string to its equivalent decimal representation. It accepts rows of gray coded string and returns the equivalent decimal sequence as a column vector.

Example:

>>g = [1 0 0 1 1;0 0 0 1 1; 0 1 1 0 1];
>>gc2dec(g)

ans =

29
2
9

Cite As

Arjun Srinivasan Rangamani (2026). gc2dec (https://www.mathworks.com/matlabcentral/fileexchange/8275-gc2dec), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Data Type Conversion in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0