作业帮 > 综合 > 作业

Matlab上的牛顿迭代法 计算

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/27 13:54:00
Matlab上的牛顿迭代法 计算
想了解一下以下的 coding 其中 从 while abs(ff) > err 的部分里的计算式 与上面的计算式一样, 可否忽略掉 及其原因 求大师讲解啊!
%%%% ellipse 3
%change invq to invq%
theta=theta_3;
while kkk==3 && theta err
theta_ell = theta_ell-ff/dff;
ff = (kk_3^2-1)*rl2_3*sin(theta_ell)-(r2*cos(alpha)-dd_3)*tan(theta_ell)-kk_3*r2*sin(alpha);
dff = (kk_3^2-1)*rl2_3*cos(theta_ell)-(r2*cos(alpha)-dd_3)*sec(theta_ell)^2;
if iter > iter_max
% break
end
end
if theta_ell >= pi/2
break;
end

cx = (dd_3-rl2_3*cos(theta_ell)).*cos(alpha)+kk_3*rl2_3*sin(theta_ell).*sin(alpha);
cy = (dd_3-rl2_3*cos(theta_ell)).*sin(alpha)-kk_3*rl2_3*sin(theta_ell).*cos(alpha);
shafefactor = 3;
kkk = 1;

end %%% while 3
应该不行吧,第一个出现的代码,循环条件是while kkk==3 && theta