Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

function for Modulo 2 division

45 views
Skip to first unread message

JS

unread,
Oct 22, 1997, 3:00:00 AM10/22/97
to

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
jsh...@dreo.dnd.ca) . It would save me a lot of time. I will return the
favour some time.

Thanks,
JS

Wes Wang

unread,
Oct 23, 1997, 3:00:00 AM10/23/97
to

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
wa...@mathworks.com
---------------------------------------------

cwhite

unread,
Oct 28, 1997, 3:00:00 AM10/28/97
to

JS wrote:

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

0 new messages