help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting Galois Field elements to binary?


From: Mike Miller
Subject: Re: Converting Galois Field elements to binary?
Date: Fri, 24 Jun 2016 08:53:58 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

On Fri, Jun 24, 2016 at 07:36:46 -0400, Andreas Yankopolus wrote:
> 
> I'm trying to convert Galois Field elements to binary. For example:
> 
> >> gf([43],6)
> ans =
> GF(2^6) array. Primitive Polynomial = D^6+D+1 (decimal 67)
> 
> Array elements =
> 
>    43
> 
> How do I get at that 43 as a decimal? The goal is to convert the
> elements to binary for mapping onto different signal constellations,
> such as octal for 8-PSK. So something like:
> 
> >> bitand(gf([43],6), 7) 
> 
> For the low-order bits and:
> 
> >> bitshift (gf([43],6), -3) 
> 
> For the high-order ones. But these both give invalid operand type
> errors. I see that:
> 
> >> class(gf([43],6))
> ans = galois
> 
> But I'm not sure how to use this fact. I see some lists of Galois Field
> member functions, but there's nothing obvious that converts elements to
> decimal. Octal would be fine as well.

The galois type has attributes to get at the underlying properties, for
example

  >> x = gf (43, 6);
  >> x.x
  ans =  43
  >> x.m
  ans =  6

This is described in the manual that is included in the communications
package (admittedly not easily accessible to everyone).

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]