有无穷个解,可以采用图解法
如果求在某区域内的解,可以用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
怎么利用数形结合来做呢
可以画图后,用 ginput取交点,要精确的话 放大后取点
2024-12-30 广告
http://zhidao.baidu.com/question/149807586.html
x=-227.76138492214221485037631056138
我做出来的也是这个结果,感觉不对
为什么不对呢,带入验证就是对的啊。
但是这个方程有无穷多个解的,这只是其中的一个
2011-05-16
f1=
tan(x)-x+17.18741575
>>solve(f1,'x')
ans=
0
不知道对不,也好长时间没用了,我没装matlab软件,你试试
可能不太对吧