How to get 1 as the highest order coefficient in a polynomial expression?

조회 수: 6 (최근 30일)
Hemanth
Hemanth 2024년 11월 29일
댓글: John D'Errico 2024년 11월 29일
Hi,
I would like to get 1 as the highest order coefficient in the denomitor. How can I get that?
clear; clc
syms p K_s0 Phi_V Phi_G s K_p K_x0 T_i real;
Phi_V = -p*(K_p/K_x0)*(1 + 1/(s*T_i))*1/s;
eqn1 = p == K_s0*(Phi_V + Phi_G);
eqn2 = isolate(eqn1, p);
eqn3 = collect(eqn2/Phi_G, s); disp(char(eqn3))
p/Phi_G == ((K_s0*K_x0*T_i)*s^2)/((K_x0*T_i)*s^2 + (K_p*K_s0*T_i)*s + K_p*K_s0)
  댓글 수: 2
Torsten
Torsten 2024년 11월 29일
According to which variable is 1 the highest coefficient in the denominator ?
John D'Errico
John D'Errico 2024년 11월 29일
Are you looking to find a partial fraction decomposition of the function?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2024년 11월 29일
syms p K_s0 Phi_V Phi_G s K_p K_x0 T_i real;
Phi_V = -p*(K_p/K_x0)*(1 + 1/(s*T_i))*1/s;
eqn1 = p == K_s0*(Phi_V + Phi_G);
eqn2 = isolate(eqn1, p);
eqn3 = collect(eqn2/Phi_G, s); disp(char(eqn3))
p/Phi_G == ((K_s0*K_x0*T_i)*s^2)/((K_x0*T_i)*s^2 + (K_p*K_s0*T_i)*s + K_p*K_s0)
[N,D] = numden(rhs(eqn3))
c = coeffs(D,s,'all');
N1 = N/c(1)
D1 = expand(D/c(1))
eqn4 = lhs(eqn3) == N1/D1; disp(char(eqn4))
p/Phi_G == (K_s0*s^2)/(s^2 + (K_p*K_s0*s)/K_x0 + (K_p*K_s0)/(K_x0*T_i))

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by