Solve symbolic equation - answer gives equation, not number

13 views (last 30 days)
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

Accepted Answer

madhan ravi
madhan ravi on 2 Jul 2020
double(sol_x)

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!