Solve symbolic equation - answer gives equation, not number

12 次查看(过去 30 天)
Hi,
I am solving some equation system:
syms x y
eq1 = (x - 1)^2 + y^2 == 16;
eq2 = (x - 5)^2 + (y - 1)^2 == 2;
[sol_x, sol_y] = solve([eq1, eq2]);
sol_x
sol_y
The aswer is not a single number, it needs calcualtion:
sol_x =
127^(1/2)/34 + 79/17
79/17 - 127^(1/2)/34
sol_y =
31/34 - (2*127^(1/2))/17
(2*127^(1/2))/17 + 31/34
How can I "calculate" this answer via coding?
Thank you in advance

采纳的回答

madhan ravi
madhan ravi 2020-7-2

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by