How to factor out variables in the num and den of an equation?

조회 수: 2 (최근 30일)
Abdel-Rahman Ashraf
Abdel-Rahman Ashraf 2020년 6월 3일
편집: Abdel-Rahman Ashraf 2020년 6월 3일
I have the following expression
syms s GM1 GM2 CC1 CC2 CC3 RC
LG = -((1.0*GM1*(CC1*CC2 - CC1*CC2*GM3*RC)*s^2)/(CC1*GM2*GM3) + (1.0*GM1*(CC1*GM2*GM3*RC - CC2*GM2 + CC2*GM2*GM3*RC)*s)/(CC1*GM2*GM3) + (1.0*GM1)/CC1)/((1.0*(CC2*CL + CC2*CL*GM2*RC)*s^3)/(GM2*GM3) + (1.0*(CC2*GM2 + CC2*GM3)*s^2)/(GM2*GM3) - 1.0*s);
Gain = LG/(1+LG);
The question is how to factor out (GM1*GM2*GM3) from the numerator and (1+s/wp1) from the denominator where (wp1 = 1/GM1*RC) . I have tried the following:
Gain1 = collect(simplify(Gain))
And this is the result I got from the live script
So I want to make it look something like that
Thanks in advance.
  댓글 수: 2
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2020년 6월 3일
You can try: simplifyFraction()
Abdel-Rahman Ashraf
Abdel-Rahman Ashraf 2020년 6월 3일
Thank you for your answer. I tried it but it seems like it doesn't have an option to factor out the terms I refered to.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by