필터 지우기
필터 지우기

Working With Inverse of Polynomials

조회 수: 34 (최근 30일)
Daniel Scrobe
Daniel Scrobe 대략 7시간 전
편집: Torsten 대략 1시간 전
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 대략 1시간 전
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 대략 1시간 전
편집: Torsten 대략 1시간 전
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 대략 6시간 전
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 대략 6시간 전
편집: Walter Roberson 대략 2시간 전
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 대략 3시간 전
편집: Daniel Scrobe 대략 3시간 전
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