필터 지우기
필터 지우기

How can i divide symbolic polinoms?

조회 수: 8 (최근 30일)
Maria Maximina
Maria Maximina 2014년 2월 21일
댓글: Walter Roberson 2014년 2월 24일
Hi! I have two symbolic polinoms as vector expression: n=[num1 num2] d=[den1 den2 den3]
I want to opperate d/n. As they are simbolic expression, i cannot use typical pdivide function. Checking around in internet I found:
[c,r]=quorem(d,n)
I get an answer like this:
c=[ A div B, C div D] r=[ E mod F, G mod H]
I dont know what do mod and div mean!
On the other side, I also found another option in this chat for the same porpuse:
feval(symengine,'pdivide',d,n)
and the answer that i get is something like:
[a,b,polinom]
It looks good but i dont know what do those a and b represent
I am just trying to find as easiest exppression as possible... I hope you can help me! thanks to everyone in advance!!

채택된 답변

Walter Roberson
Walter Roberson 2014년 2월 21일
"div" is division with remainder discarded. "mod" is remainder only.
For feval(symengine,'pdivide',d,n) if your result is [a,b,polinom] then
a * d = b * n + polinom
"By default, pdivide determines the factor b as b = lcoeff (q)^( degree (p) - degree(q) + 1)."
lcoeff() here is "leading coefficient", and so is what the highest-order term of the variable in q is multiplied by

추가 답변 (1개)

Maria Maximina
Maria Maximina 2014년 2월 24일
ok i have one more question then... i do not understand really good how does it work with that mod and div at the [c,q]=quorem([d],[n])
What I get is
c=[ A div B, C div D] r=[ E mod F, G mod H]
What does it really mean, if i want to get a d/n ???
Thanks again!
  댓글 수: 1
Walter Roberson
Walter Roberson 2014년 2월 24일
Could you give an actual example showing d and n and the outputs you get?

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

Community Treasure Hunt

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

Start Hunting!

Translated by