Azzera filtri
Azzera filtri

how to make symbolic answer better looking ?

8 visualizzazioni (ultimi 30 giorni)
tomer polsky
tomer polsky il 12 Nov 2017
Risposto: Star Strider il 12 Nov 2017
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 ?

Risposte (1)

Star Strider
Star Strider il 12 Nov 2017
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).

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by