deconv function and gf arithmetic not working?

조회 수: 6 (최근 30일)
Diego Coelho
Diego Coelho 2024년 4월 16일
댓글: prabhat kumar sharma 2024년 5월 2일
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
prabhat kumar sharma
prabhat kumar sharma 2024년 5월 2일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by