Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Using functions for polynomials
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
dpb
el 15 de Dic. de 2019
Well, you could show us what inputs you used and the error message for starters...
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!