Matlab 2015a Script to solve the equation w=-tan(0.8*w)

1 次查看(过去 30 天)
To solve the equation symbolically or numerically, I wrote the following script (Matlab 2015a):
%-----------------------------------------------------------
syms w
EQ = w + tan (0.8 * w) == 0;
S = solve (EQ, w)
%-----------------------------------------------------------
But I don't get the expected result, that is w = 2.4482, rather I get :
Warning: Cannot solve symbolically. Returning a numeric approximation instead.
> In solve (line 305)
S =
0
Please, any help to fix the script

采纳的回答

Star Strider
Star Strider 2022-5-7
Use vpasolve with an initial value (or range of values as described in Specify Ranges of Solutions) —
syms w
EQ = w + tan (0.8 * w) == 0;
S = vpasolve (EQ, w, 2)
S = 
2.4482183943587910343011460497668
.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

产品


版本

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by