필터 지우기
필터 지우기

how to make symbolic answer better looking ?

조회 수: 8 (최근 30일)
tomer polsky
tomer polsky 2017년 11월 12일
답변: Star Strider 2017년 11월 12일
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