No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

5.0 | 1 rating Rate this file 1 Download (last 30 days) File Size: 1.32 KB File ID: #8275 Version: 1.0




11 Aug 2005 (Updated )

Function to convert a gray coded sequence to a decimal sequence.

| Watch this File

File Information

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.


>>g = [1 0 0 1 1;0 0 0 1 1; 0 1 1 0 1];

ans =



This file inspired Genetic Algorithm To Optimise Schaffer's F6 Function.

Required Products MATLAB Compiler
MATLAB release MATLAB 6.5.1 (R13SP1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
12 Mar 2009 Jim

Jim (view profile)

Here's a gray to standard translation using builtins, no explicit looping:


Comment only
11 Jul 2007 Cathy Williams

neat work!

Contact us