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
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!