Borrar filtros
Borrar filtros

Symbolic Fraction Summation with Common Denominator

20 visualizaciones (últimos 30 días)
Kaan Uçar
Kaan Uçar el 16 de Nov. de 2020
Comentada: Swatantra Mahato el 19 de Nov. de 2020
Hello there, hope you are all doing well.
I have two symbolic fractions with different denominators and I would like to know the result of the subtraction of them. I tried simplify and simplifyFraction functions; however they do not yield the result I want. I want the result to be in the form of A/B.
Here are the fractions and the result I get:
syms M1 M2 K1 K2 B s
T1 = (B*s + K1)/ ((M1*M2)*s^4 + (M1*B+M2*B)*s^3 + (M1*K1+M2*K1+M1*K2)*s^2 + (B*K2)*s + (K1*K2));
T = (M1*s^2 + B*s + K1) / ((M1*M2)*s^4 + (B*M1+B*M2)*s^3 + (K1*M1+K1*M2+K2*M1)*s^2 + (B*K2+B*K1-B)*s + (K1^2 -K1 + K1*K2));
T2 = T1 - T
T2 =
(K1 + B*s)/(M1*M2*s^4 + (B*M1 + B*M2)*s^3 + (K1*M1 + K1*M2 + K2*M1)*s^2 + B*K2*s + K1*K2) - (M1*s^2 + B*s + K1)/(s^3*(B*M1 + B*M2) - K1 + s^2*(K1*M1 + K1*M2 + K2*M1) + K1^2 + s*(B*K1 - B + B*K2) + K1*K2 + M1*M2*s^4)
Can you tell me which specific function I need to use to obtain the T2 in the form of A/B?
  1 comentario
Swatantra Mahato
Swatantra Mahato el 19 de Nov. de 2020
Hi Kaan,
When I execute the "simplifyFraction" function as below
T2 = simplifyFraction(T1 - T)
I get the output in the form A/B
T2 =
-(- B^2*K1*s^2 + B^2*s^2 - 2*B*K1^2*s + 2*B*K1*s + B*M1^2*s^5 + M2*B*M1*s^5 + K2*B*M1*s^3 - K1^3 + K1^2 + K1*M1^2*s^4 + M2*K1*M1*s^4 + K2*K1*M1*s^2 + M2*M1^2*s^6 + K2*M1^2*s^4)/((K1*K2 + B*K2*s + B*M1*s^3 + B*M2*s^3 + K1*M1*s^2 + K1*M2*s^2 + K2*M1*s^2 + M1*M2*s^4)*(K1^2 - B*s - K1 + K1*K2 + B*K1*s + B*K2*s + B*M1*s^3 + B*M2*s^3 + K1*M1*s^2 + K1*M2*s^2 + K2*M1*s^2 + M1*M2*s^4))
Can you provide the expected result and if you obtain it by solving by hand?
Thanks

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Communications Toolbox en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by