function for Modulo 2 division

function for Modulo 2 division

Post by J » Thu, 23 Oct 1997 04:00:00



Has anyone written a Matlab function for performing Modulo 2 division?  For
example, given 2 polynomials (Q, P) with coefficients of 1s and 0s, perform
long division to provide the result of Q / P, and/or the remainder (the user
would have to specify the number of decimal places elements to include in the
answer if the remainder is not requested).

I would be very grateful if you could share your  mfile with me (email to

favour some time.

Thanks,
JS

 
 
 

function for Modulo 2 division

Post by Wes Wan » Fri, 24 Oct 1997 04:00:00


There is a set of functions in the Communications Toolbox for Galois
field, aka GF(q^p), computation, where q is a prime number and p is
an interger. The functions are written for the use of error control
coding in the toolbox. You may use them to do element-by-element
computation as well as polynomial computation in GF(q^p). Your
application uses a special case (q=2, and p=1) of the Galois field
computation capability.

Wes

---------------------------------------------


> Has anyone written a Matlab function for performing Modulo 2 division?  For
> example, given 2 polynomials (Q, P) with coefficients of 1s and 0s, perform
> long division to provide the result of Q / P, and/or the remainder (the user
> would have to specify the number of decimal places elements to include in the
> answer if the remainder is not requested).

> I would be very grateful if you could share your  mfile with me (email to

> favour some time.

> Thanks,
> JS


 
 
 

function for Modulo 2 division

Post by cwhit » Wed, 29 Oct 1997 04:00:00



> Has anyone written a Matlab function for performing Modulo 2
> division?  For example, given 2 polynomials (Q, P) with coefficients
> of 1s and 0s, perform long division to provide the result of Q / P,
> and/or the remainder (the user would have to specify the number of
> decimal places elements to include in the answer if the remainder is
> not requested).

I wonder if the "deconv" function would be useful to you.  It performs
polynomial division.

EDU? help deconv

 DECONV Deconvolution and polynomial division.

  [Q,R] = DECONV(B,A) deconvolves vector A out of vector B.  The result

  is returned in vector Q and the remainder in vector R such that

  B = conv(Q,A) + R.

  If A and B are vectors of polynomial coefficients, deconvolution

  is equivalent to polynomial division.  The result of dividing B by

  A is quotient Q and remainder R.

  See also CONV.

EDU? version

ans =

Student 4.0

EDU?

 
 
 

1. Simple question about modulo function

Hi All,

My simple question about the modulo function ( mod(5,3) = 2) is
where is it?  I'm new to matlab so if I have to write an m-file,
how do make sure that my answer is an integer? FOr example,

        ((11/7) - 1) * 7 = 4.00000001

Any ideas?

Thanks,
Chuck

2. Help with Excel -> Money Problem

3. Simulink modulo function

4. Netra T1 server question

5. FLOOR Function using division in FOR loop

6. Hi Guyz

7. Modulo operation!!!

8. MidWest SAS Users Group 2002 Conference Only One Week Away!

9. Modulo-2

10. Modulo

11. Modulo-2 matrix operation

12. matrix left division

13. ignoring division by 0 errors with the symbolic math tool box