求方程在0.5附近的根,相应的命令是()。

9 查阅

求方程在0.5附近的根,相应的命令是()。

A.>> fx=@(x) x-sin(x)/x;>> z=fzero(fx,0.5)

B.>> z=fzero(@(x) x-sin(x)/x,0.5)

C.>> fx=@(x) x-sin(x)/x;>> z=fsolve(fx,0.5)

D.>> z=fsolve(@(x) x-sin(x)/x,0.5)

参考答案:

答案:>> fx=@(x) x-sin(x)/x;>> z=fzero(fx,0.5);>> z=fzero(@(x) x-sin(x)/x,0.5);>> fx=@(x) x-sin(x)/x;>> z=fsolve(fx,0.5);>> z=fsolve(@(x) x-sin(x)/x,0.5)