polynomial division issue, how to find the remainder

5 ビュー (過去 30 日間)
aya
aya 2013 年 12 月 9 日
回答済み: M Naeem 2023 年 8 月 10 日
i have two polynomials like
a=X14 + X13 + X10 + X9
b=X8 + X7 + X6 + X4 + 1
i want to find a mod b using matlab pls.
  3 件のコメント
aya
aya 2013 年 12 月 9 日
yes x4=x^4 and so on
aya
aya 2013 年 12 月 10 日
hello sir i am really thankful for your help but i still have problem with polynomial remainder that is what i am doing
a='110011000000000'; aa=bin2dec(a); b='000000111010001'; bb=bin2dec(b); r=rem(aa,bb); re=dec2bin(r)
re =
1001000
the answer re should be 1001 why i am getting these extra zeros by the way a=x^14+x^13+x^10+x^9 and b=x^8+x^7+x^6+x^4+1
another thing when i write them with out making them have the same size i get a totaly different answer

サインインしてコメントする。

採用された回答

Roger Stafford
Roger Stafford 2013 年 12 月 9 日
If your field is that of the real numbers, look at 'deconv' function at:
http://www.mathworks.com/help/matlab/ref/deconv.html
This is a quote from that documentation: "If u and v are vectors of polynomial coefficients, convolving them is equivalent to multiplying the two polynomials, and deconvolution is polynomial division. The result of dividing v by u is quotient q and remainder r."
  3 件のコメント
Walter Roberson
Walter Roberson 2013 年 12 月 9 日
What datatype is c ? Do you mean c = [1 1 0 0 0 1 1 1 ...] or do you mean c = '1100011...' or do you mean c=110001111101010 decimal ?
aya
aya 2013 年 12 月 9 日
c='110001111101010'

サインインしてコメントする。

その他の回答 (2 件)

Walter Roberson
Walter Roberson 2013 年 12 月 9 日
Possibly x^6 + x^3 depending on what your formulae mean.
  6 件のコメント
Walter Roberson
Walter Roberson 2013 年 12 月 9 日
aa = bin2dec(char(a + '0'));
Walter Roberson
Walter Roberson 2013 年 12 月 9 日
To convert c='110001111101010' to -1 for 1 and 1 for 0, use
2*('0' - c) + 1

サインインしてコメントする。


M Naeem
M Naeem 2023 年 8 月 10 日
how we divide two polynomials in Polynomial Ring (Z_2[x]) to find the remainde?... let suppose i want to divide x^113 by x^8+x^4+x^3+x^2+1

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by