Matlab 2015a Script to solve the equation w=-tan(0.8*w)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
T Hafid
el 7 de Mayo de 2022
Comentada: Star Strider
el 7 de Mayo de 2022
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
0 comentarios
Respuesta aceptada
Star Strider
el 7 de Mayo de 2022
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)
.
2 comentarios
Star Strider
el 7 de Mayo de 2022
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Más respuestas (0)
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!