deconv function and gf arithmetic not working?

I came across this strange behaviour that seems to be a bug, but I am not sure that is the case.
>>poly = [1 1 0 0 0 1 0 1];
>>polyGF = gf(poly, 1);
>> z = gf([1, zeros(1, 607)], 1);
>>[a, b] = deconv(z, polyGF);
According the Galois Field (gf) documentation deconv must perform polynomial division, where the polynomial coefficients are interpreted in descending order. The problem is that according to this code b will be all 0s, which is wrong. In fact, if I do conv(a, polyGF) it wont result in z.
I did write my own polynomial division in matlab just using arrays of gf, and I get what I expet. Worse, I did translate the code to python using the galois package and its builtin functions, and I get the result I expect.
I am thorn between beleiving it is a bug or just a limitation of the size of the arrays that deconv can support, despite I can not find any related information on the documentation.
Last but not least, if I reduce the size z, let us say making it z = gf([1, zeros(1, 120)]), I get a correct answer, which leads me to think it is either a deconv internal limitation of sizes or bug.
version: R2018b

1 Comment

I have also faced the same behaviour, On the smaller sized GF arrays I am getting the correct results while on large values getting unexpected results. It suspects it's related to the size limitation mostly.

Sign in to comment.

Answers (0)

Categories

Tags

Asked:

on 16 Apr 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!