> 其他 >
matlab中fzero函数求解方程:cos(x)=x*(e^x)
人气:106 ℃ 时间:2020-03-29 20:02:41
解答
>> syms x
>> fun=inline(cos(x)-x.*exp(x)','x')
fun =
Inline function:
fun(x) = cos(x)-x.*exp(conj(x))
>> fzero(fun,[0.1,0.6])
ans =
0.5178能给点注释吗?谢谢!syms x %定义变量 xfun=inline() %定义函数fzero(fun,[0.1,0.6]) %fzero函数零点,零点处于[0.1,0.6]范围
推荐
猜你喜欢
© 2025 79432.Com All Rights Reserved.
电脑版|手机版