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

조회 수: 1 (최근 30일)
T Hafid
T Hafid 2022년 5월 7일
댓글: Star Strider 2022년 5월 7일
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
.
  댓글 수: 2
T Hafid
T Hafid 2022년 5월 7일
Thank you
Star Strider
Star Strider 2022년 5월 7일
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

댓글을 달려면 로그인하십시오.

추가 답변 (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