如何在matlab中求解tan(x)-x=-17.18741575,这个方程,急,正确的答案好像是17.几
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/31 17:04:00
如何在matlab中求解tan(x)-x=-17.18741575,这个方程,急,正确的答案好像是17.几
如何在matlab中求解tan(x)-x=-17.18741575,这个方程,急,
正确的答案好像是17.几
如何在matlab中求解tan(x)-x=-17.18741575,这个方程,急,正确的答案好像是17.几
有无穷个解,可以采用图解法
如果求在某区域内的解,可以用fsolve
fsolve(@(x)tan(x)-x+17.18741575,-5,5)
Warning: Struct field assignment overwrites a value with class "double".
See MATLAB 7.0.4 Release Notes, Assigning Nonstructure Variables As Structures Displays Warning for details.
> In createOptionFeedback at 32
In fsolve at 353
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the default value of the function tolerance, and
the problem appears regular as measured by the gradient.
<stopping criteria details>
ans =
-7.8140
solve('tan(x)-x=-17.18741575')
x=-227.76138492214221485037631056138
以前学过,忘记了
>>f1=sym('tan(x)-x+17.18741575')
f1=
tan(x)-x+17.18741575
>>solve(f1,'x')
ans=
0
不知道对不,也好长时间没用了,我没装matlab软件,你试试
看看这个 应该对你有帮助
http://zhidao.baidu.com/question/149807586.html