how to make symbolic answer better looking ?

8 次查看(过去 30 天)
hello I used solve function to solve a an eqution how ever the answer is very long for exmaple here is the answer
(R*R1*((R^4*U^2 + 2*R^3*R_C*U^2 - 2*R^3*R_C*U*V - 2*R^3*R_C1*U*V - 4*R1*R^3*V^2 - 4*R1*V_diode*R^3*V + R^2*R_C^2*U^2 - 2*R^2*R_C^2*U*V + R^2*R_C^2*V^2 - 4*R^2*R_C*R_C1*U*V + 2*R^2*R_C*R_C1*V^2 - 8*R1*R^2*R_C*V^2 - 8*R1*V_diode*R^2*R_C*V + R^2*R_C1^2*V^2 - 4*R1*R2*R^2*V^2 - 2*R*R_C^2*R_C1*U*V + 2*R*R_C^2*R_C1*V^2 - 4*R1*R*R_C^2*V^2 - 4*R1*V_diode*R*R_C^2*V + 2*R*R_C*R_C1^2*V^2 - 8*R1*R2*R*R_C*V^2 + R_C^2*R_C1^2*V^2 - 4*R1*R2*R_C^2*V^2)^(1/2) - R^2*U - R*R_C*U + R*R_C*V + R*R_C1*V + R_C*R_C1*V))/(2*(R1*R^2 + R1*R_C*R)*(R*V + R2*V + R*V_diode)) - (R*R_C*V - R*R_C*U - R^2*U + R*R_C1*V + R_C*R_C1*V)/((R + R_C)*(R*V + R2*V + R*V_diode))
as u can see the answer is very long , is there a wat to show the answer as a Fraction ?

回答(1 个)

Star Strider
Star Strider 2017-11-12
First, see if the simplify command helps.
To get the numerator and denominator, use the numden function.
To get somewhat more understandable output, use the pretty function. (You cannot use this in code. It is for display only).

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by