비선형방정식의 해 값을 간결하게 표현하려면 어떻게 해야하나요?

안녕하세요
Symbolic Toolbox 를 통해 비선형방정식의 해를 구하려고 하는데요,
예를들어, 아래와 같이 코드를 작성한 후 계산하면 해 값으로 1/2 - (3355~~ 식으로 출력이 됩니다.
사실 이 값을 command에 입력하면 0.1558 로 간단하게 출력이 됩니다.
이런식으로 해를 간단한 형태로 출력되게 하려면 어떻게 해야할까요?
syms f y_A0 y_B0 y_C0 P T
for y_A0 = 0.5:0.1:0.9
y_B0 = 1-y_A0;
y_C0 = 0;
P = 2;
T = 423;
equation1 = (y_C0+f*y_A0)*(1-2*f*y_A0)^2/(y_A0-f*y_A0)/(y_B0-2*f*y_A0)^2/P^2 - exp(11454/T-28.36);
equation2 = y_A0-f*y_A0 > 0 ;
equation3 = y_B0-2*f*y_A0 > 0 ;
equ = [equation1 equation2 equation3 ];
solution = solve(equ,f)
end
solution =
1/2 - (33554432*9502337923034183^(1/2))/9502337923034183
solution =
5/9 - (2*3^(1/2)*9502337923034183^(1/2)*12035612713430087^(1/2)*sin(pi/3 - atan((528482304*28507013769102549^(1/2)*1917227268151034126266240444162^(1/2))/36083747825255125136499363251279)/3))/85521041307307647 - (2*9502337923034183^(1/2)*12035612713430087^(1/2)*cos(pi/3 - atan((528482304*28507013769102549^(1/2)*1917227268151034126266240444162^(1/2))/36083747825255125136499363251279)/3))/85521041307307647
...

 采纳的回答

madhan ravi
madhan ravi 2020-6-11

0 个投票

double(solution)
%or
vpa(solution)

3 个评论

Cheol Hwan Park
Cheol Hwan Park 2020-6-11
Thanks for your help
Then, can I ask one more ?
I want to plot the 'solution' with respect to 'y_A0'
ex) (y_A0, solution) = (0.5, 0.1558)
(0.6, 0.1007)
...
but, workspale do not save the whole cases(from y_A0 : 0.5 ~ to y_A0:0.9) but last case (y_A0 = 0.9)
so, I cannot plot.
How can I plot the solution with respect to Y_A0 ?
madhan ravi
madhan ravi 2020-6-11
It’s better you post is as a new question by uploading all the datas as.mat file.
Cheol Hwan Park
Cheol Hwan Park 2020-6-11
Ok. Thanks.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!