Hello, this is my first post in this form and I am new to MatLab. I would like to take the inverse of a polynomial in factored form and express the answer in polynomial form. For example, I wish to convert 10/((x+3)^2(x+5)) in regular polynomial form.
I think maybe I am asking Matlab to perform something that can’t be done. I want to divide a number by an expression that is in factored form and assign the answer to a variable. I thought using the poly command provides the coefficients of a polynomial and also is the expression itself. But results of the poly command simply outputs an array of numbers. I just may be going about this in the wrong way.
To convert a polynomial in factored form to regular polynomial form, you can use the poly function in MATLAB. Here's an example:
% Define the factored polynomial
num = 10;
den = conv(conv([1 3], [1 3]), [1 5]);
% Convert to regular polynomial form
coeffs = num * poly(den)
coeffs = 1x5
10 -960 27740 -219840 193050
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
The 'poly' function converts the factored form to regular polynomial form, and then we multiply it by the numerator to get the coefficients of the regular polynomial. Please refer to the following documentation for more information on 'poly' function:
When I divide the numerator by the denominator, I get an error using the "/" symbol: Matrix dimensions must agree. How would I get rid of the denominator? I was thinking if I could take the inverse of it, I could bring that up into the numerator section.