MATLAB: Solve symbolic equation – answer gives equation, not number

equationMATLABsolvesymbolicSymbolic Math Toolbox

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

Best Answer

double(sol_x)
Related Question