Working With Inverse of Polynomials

41 次查看(过去 30 天)
Daniel Scrobe
Daniel Scrobe about 9 hours 前
编辑: Torsten about 3 hours 前
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.
  5 个评论
Walter Roberson
Walter Roberson about 3 hours 前
It is difficult to tell what you want?
syms x
f = 10/((x+3).^2.*(x+5))
f = 
[N, D] = numden(f)
N = 
10
D = 
C = coeffs(D, x)
C = 
poly2sym(C, x)
ans = 
tf(double(N), double(C))
ans = 10 -------------------------- 45 s^3 + 39 s^2 + 11 s + 1 Continuous-time transfer function.
Torsten
Torsten about 3 hours 前
编辑:Torsten about 3 hours 前
syms x
p = (x+3)^2*(x+5)
p = 
expand(p)
ans = 
coeffs(p)
ans = 
What do you want to do next ?

请先登录,再进行评论。

回答(2 个)

Sam Chak
Sam Chak about 8 hours 前
Are looking for an inverse like this?
syms x
f(x) = 10/((x+3)^2*(x+5))
f(x) = 
g = finverse(f)
g(x) = 

Naga
Naga about 8 hours 前
编辑:Walter Roberson about 4 hours 前
Hello Daniel,
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:
Hope this helps!
  1 个评论
Daniel Scrobe
Daniel Scrobe about 5 hours 前
编辑:Daniel Scrobe about 5 hours 前
Hello Naga,
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.

请先登录,再进行评论。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by