## function for Modulo 2 division

### function for Modulo 2 division

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

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

> 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.

EDU? version

ans =

Student 4.0

EDU?

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

6. Hi Guyz

9. Modulo-2

10. Modulo