What is wrong with my solve function?
3 次查看(过去 30 天)
显示 更早的评论
This is an example from the solve documentation, however my matlab isn't getting the same output as the example. Does anyone know why this is happening? The output is supposed to be solx=pi/2
Matlab Code:
syms x
eqn = sin(x) == 1;
solx = solve(eqn,x)
x =
x/sin(x) == x
solx =
x/sin(x) == x
0 个评论
回答(2 个)
Steven Lord
2016-10-21
Did you previously define a variable named sin that's taking precedence over the built-in sin function? You can check this using the which function.
另请参阅
类别
在 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!