Extended (n,k)-gray code

버전 1.3.0.0 (4.17 KB) 작성자: Guangdi Li
We extend normal gray code to conside about different range for each digit.
다운로드 수: 1.4K
업데이트 날짜: 2010/1/26

라이선스 보기

Our basic idea is based on (n,k)-gray code which was introduced in one paper named :"Generalized Gray Codes with Applications".

Our extention is allowing each digit ranged from different digit which is widely useful in some situations.For example, (3,2)-Gray code is (0,0), (0,1), (0,2),(1,2),(1,0),(1,1),(2,1),(2,2),(2,0). The parameter 3 is the range of each digit {0,1,2}, and 2 restricts there are 2 digits.
Our extended gray code is working in this way. For example, if we want to generate gray code with the range of {2 3 3 4} for each digit as input parameter, our function will produce: 0000,1000,1100,0100,0200,1200,1210,0210,........ in total of 72 sequences.

Please start from 'ControlCenter.m', we give an example there with detailed explanation.
I also add mex programming function for fast generation, good for advance users.Pay attention, i have only tested it under linux.
If there is any question, please let me know, I will answer you questions within one day if internet is available.

인용 양식

Guangdi Li (2024). Extended (n,k)-gray code (https://www.mathworks.com/matlabcentral/fileexchange/23013-extended-n-k-gray-code), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.3.0.0

improve it by mex programming.

1.2.0.0

this time I add a detailed example, thanks for you help.

1.0.0.0