- 0
- 0
- 约2.22万字
- 约 25页
- 2023-03-10 发布于江苏
- 举报
1、%用牛顿法求f(x)=x-sin x 的零点,e=10^(-6)
disp(牛顿法);
i=1;
n0=180;
p0=pi/3;
tol=10^(-6);
for i=1:n0
p=p0-(p0-sin(p0))/(1-cos(p0));
if abs(p-p0)=10^(-6)
disp(用牛顿法求得方程的根为)
disp(p);
disp(迭代次数为:)
disp(i)
break;
end
p0=p;
end
if i==n0~(
原创力文档

文档评论(0)