We have recently learned how to solve polynomial equations in Matlab, now we are going to visit a trick that will help you learn how to do Division and Multiplication of polynomial using Matlab.
Polynomial Division example
Polynomial Multiplication example
Matlab Polynomial
Multiplication of polynomial can be a very dreary task, so do the division of polynomial. Matlab uses the functions conv and deconv to help you do these tasks with the least commotion possible, and most importantly with the assurance to find the right result the quickest way possible.
Let get on some examples, those will help easily learn how to make use of conv (for multiplication) and deconv (for division).
Example 1
The code
s=[1 4]; t=[1 4 -3]; conv(s,t)
Which returns
Rewritten, it gives the following
Example 2
The code
c=[1 0 4]; u=[1 3]; [p,r]=deconv(c,u)% r is the remainder of the division
Which returns
Rewritten, it gives
A bit of clarity
Top-down conversion. Here we simply need to indicate the coefficient and their position in the polynomial equation.
Bottom-up conversion. Here we need to read Matlab outputs and rewrite it the way it is supposed to be, and it goes like this.
Remember you need to put a zero, in case an order is not represented in the equation. See the example below