multiplying polynomials with conv
use matlab to carry out the following multiplication of polynomials
(x+1.4)(x-0.4)x(x+0.6)(x-1.4)
heres what i did—
a = [1,1.4];
b = [1, -.4];
c = [1, 0];
d = [1, .6];
e = [1, -1.4];
p = conv(a, conv(b, conv(c, conv(d, e))))
it gave me the correct result but its tagging an extra zero onto the end of my result. i assume this means its coming out as one higher power then it is supposed to be with a "0" constant. anyone see any problems here?
my answer is supposed to come out as
p = [1, 0.2, -2.2, -3.92, .4704]
while my work is giving me
p = [1, 0.2, -2.2, -3.92, .4704, 0]
so somewhere it is giving me an extra power of x and im not sure whyuse matlab to carry out the following multiplication of polynomials
(x+1.4)(x-0.4)x(x+0.6)(x-1.4)
heres what i did—
a = [1,1.4];
b = [1, -.4];
c = [1, 0];
d = [1, .6];
e = [1, -1.4];
p = conv(a, conv(b, conv(c, conv(d, e))))
it gave me the correct result but its tagging an extra zero onto the end of my result. i assume this means its coming out as one higher power then it is supposed to be with a "0" constant. anyone see any problems here?
my answer is supposed to come out as
p = [1, 0.2, -2.2, -3.92, .4704]
while my work is giving me
p = [1, 0.2, -2.2, -3.92, .4704, 0]
so somewhere it is giving me an extra power of x and im not sure why use matlab to carry out the following multiplication of polynomials
(x+1.4)(x-0.4)x(x+0.6)(x-1.4)
heres what i did—
a = [1,1.4];
b = [1, -.4];
c = [1, 0];
d = [1, .6];
e = [1, -1.4];
p = conv(a, conv(b, conv(c, conv(d, e))))
it gave me the correct result but its tagging an extra zero onto the end of my result. i assume this means its coming out as one higher power then it is supposed to be with a "0" constant. anyone see any problems here?
my answer is supposed to come out as
p = [1, 0.2, -2.2, -3.92, .4704]
while my work is giving me
p = [1, 0.2, -2.2, -3.92, .4704, 0]
so somewhere it is giving me an extra power of x and im not sure why polynomials MATLAB Answers — New Questions