Rank: 3651 based on 28 downloads (last 30 days) and 2 files submitted
photo

Arjun Srinivasan Rangamani

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Arjun View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
12 Aug 2005 gc2dec Function to convert a gray coded sequence to a decimal sequence. Author: Arjun Srinivasan Rangamani gray, code to decimal, decimal, mathematics, general 8 2
  • 5.0
5.0 | 1 rating
22 Jul 2005 dec2gc.m This function converts a decimal number to its equivalent gray code representation Author: Arjun Srinivasan Rangamani decimal to gray code, dec2gr, positive, numberic, column, vector 20 5
  • 3.75
3.8 | 4 ratings
Comments and Ratings on Arjun's Files View all
Updated File Comment by Comments Rating
26 Dec 2009 dec2gc.m This function converts a decimal number to its equivalent gray code representation Author: Arjun Srinivasan Rangamani M, Dmitri

Darshong Chen.

Nice solution.

I used it for building sequency of Hadamard matrix of order N.

Something like:

function SeqOrd = GetSequency( N )

% N - [in] the order of Hadamard matrix
% SeqOrd - [out] the sequency, so that SeqOrd[i] is the sequency of row i
%
% Algorithm:
% 1. build a list of indexes 0..N-1
% 2. convert order of bits of each index
% 3. get the gray code value for each index ( that was converted)
% This gives the needed permutation with indexes range [0 .. N-1]

v = bitrevorder((0:N-1)'); % build list and reverse bit-order

SeqOrd = bitxor(v,bitshift(v,-1)); % find the gray-code

end

12 Mar 2009 gc2dec Function to convert a gray coded sequence to a decimal sequence. Author: Arjun Srinivasan Rangamani Jim

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

d=bin2dec(int2str(mod(cumsum(dec2bin(g)=='1'),2)));

08 Oct 2008 dec2gc.m This function converts a decimal number to its equivalent gray code representation Author: Arjun Srinivasan Rangamani Salgado, Ricardo

Good Solution

11 Jul 2007 gc2dec Function to convert a gray coded sequence to a decimal sequence. Author: Arjun Srinivasan Rangamani Williams, Cathy

neat work!

11 Jul 2007 dec2gc.m This function converts a decimal number to its equivalent gray code representation Author: Arjun Srinivasan Rangamani Williams, Cathy

can we convert a matrix? yeh whatever, served the purpose for me!

Contact us