July
July

Reputation: 15

Polynomial operations in matlab

I have three polynomials a(x), b(x) and p(x) over Galois field GF(2^n), and I would like to compute a(x)*b(x) % p(x). Can Matlab compute this expression? So far, I have found this, but it doesn't consider the p(x):

m=n;
a=[1 0 0 0 1 2] % just a example of numbers, the same type arrays for b and p as well
c = gfconv(a,b,m)

It is what I have found after days of searching, but I cannot find anywhere the formula for the type of equation I have.

Upvotes: 0

Views: 452

Answers (1)

Kostya
Kostya

Reputation: 1572

I think you're looking for remd in this expression (http://nl.mathworks.com/help/comm/galois-fields-of-odd-characteristic.html).

a = gf([1 0 0 0 1 2],n); %your example
b = gf([1 1],n); %just example
p = gf([1 0],n); % just example

[quot,remd] = deconv(conv(a,b),p);

Note that functions gfconv and gfdeconv exist, but Matlab recommends to use standard conv and deconv over 2^n field.

Upvotes: 1

Related Questions