how to multipy two polynomial expression?

hi i have to multiply two polynomial equations example:a=1+x+x^2 b=1+X output should be 1+2x+2x^2+x^3 plz do reply...

 Accepted Answer

syms x
a=1+x+x^2
b=1+x
out = expand(a*b)
or
coeffa = [1 1 1];
coeffb = [1 1];
out = conv(coeffa,coeffb);

3 Comments

Very helpful for me. Thanks buddy
it's helpful sir. Thank you
Thank you very much Andrei Bovrov.

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!