matlab 迭代法求矩阵f=298.257222101;a=6378137;b=a-a/f;e=1-(b/a)^2;x=[1 2 3 4 5 6]';y=[2 3 4 5 6 1]';z=[3 4 5 6 1 2]';L=atan(y./x);B=atan(a*z./b./sqrt(x.^2+y.^2));for i=1:200N=a./sqrt(1-e*sin(B).^2);B=B-(B-atan((z+N.*(e^2).*sin(B).)/sqrt(x.^2+y.^
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/26 07:14:12
matlab 迭代法求矩阵f=298.257222101;a=6378137;b=a-a/f;e=1-(b/a)^2;x=[1 2 3 4 5 6]';y=[2 3 4 5 6 1]';z=[3 4 5 6 1 2]';L=atan(y./x);B=atan(a*z./b./sqrt(x.^2+y.^2));for i=1:200N=a./sqrt(1-e*sin(B).^2);B=B-(B-atan((z+N.*(e^2).*sin(B).)/sqrt(x.^2+y.^
matlab 迭代法求矩阵
f=298.257222101;
a=6378137;
b=a-a/f;
e=1-(b/a)^2;
x=[1 2 3 4 5 6]';
y=[2 3 4 5 6 1]';
z=[3 4 5 6 1 2]';
L=atan(y./x);
B=atan(a*z./b./sqrt(x.^2+y.^2));
for i=1:200
N=a./sqrt(1-e*sin(B).^2);
B=B-(B-atan((z+N.*(e^2).*sin(B).)/sqrt(x.^2+y.^2)))/(1-N.*(e^2).*cos(B).*(x.^2+y.^2)/(x.^2+y.^2+(z+N.*sin(B).*(e^2).)));
end
用迭代法求图片所示的值,为什么老是报错呢?
matlab 迭代法求矩阵f=298.257222101;a=6378137;b=a-a/f;e=1-(b/a)^2;x=[1 2 3 4 5 6]';y=[2 3 4 5 6 1]';z=[3 4 5 6 1 2]';L=atan(y./x);B=atan(a*z./b./sqrt(x.^2+y.^2));for i=1:200N=a./sqrt(1-e*sin(B).^2);B=B-(B-atan((z+N.*(e^2).*sin(B).)/sqrt(x.^2+y.^
B=B-(B-atan((z+N*(e^2).*sin(B))./sqrt(x.^2+y.^2)))./(1-N*(e^2).*cos(B).*(x.^2+y.^2)./(x.^2+y.^2+(z+N.*sin(B)*(e^2))));
% 这句有问题,有一些不必要的点(已修改)