Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Using functions for polynomials
1 回表示 (過去 30 日間)
古いコメントを表示
Hello guys,
Im having trouble solving task 6 which is in the pdf file that I have shared.
This is what I have tried so far, but it's showing error message. I don't know how to carry on from this.
function ret=poly_fact(P1,P2)
a=size(P1)
b=size(P2)
orderP1=a(2)-1
orderP2=b(2)-1
for n=1:a(2)-1
if orderP1==orderP2 | orderP1>orderP2
if P1(1)==P2(1)
for n=1:(a(2)-b(2))
y=[0]
P2=horzcat(P2,y)
end
P1=P1-P2
else
d=P1(1)/P2(1)
P2=P2*d
end
else
disp('The order of P1 must be at least as high as the order of P2')
end
end
Can anyone help me with task 6.
Thank you.
1 件のコメント
dpb
2019 年 12 月 15 日
Well, you could show us what inputs you used and the error message for starters...
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!