matlab function "solve" couldn't solve correctly
显示 更早的评论
syms x;
g=x.^2-sin(x+0.15);
s=solve(g==x)
hold on;
fplot(g);
fplot(x);
As above, the equation "x.^2-sin(x+0.15)==x" should have 2 answers. I can tell from the plot of g and x.

While using the function " solve ", i could only get one answer as below.
Warning: Unable to solve symbolically. Returning a numeric approximation instead.
> In solve (line 304)
In test (line 3)
s =
-0.07234414896484352635594864867791
Does it happen when "solve" Unable to solve symbolically, or is there something with my way of solving this problem. Thank you guys in advance.
采纳的回答
更多回答(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!