?? xyz2sph.m
字號:
function [az,va,d]=xyz2sph(x,y,z)% XYZ2SPH Converts Cartesian coordinates in a left-handed% (local geodetic) system to spherical coordinates.% Vectorized. See also SPH2XYZ.% Version: 7 Jul 96% Useage: [az,va,d]=xyz2sph(x,y,z)% Input: x \% y > vectors of cartesian coordinates (linear units)% z /% Output: az - vector of azimuths (radians)% va - vector of vertical angles (radians)% d - vector of distances (linear units)d=sqrt(x.*x+y.*y+z.*z);az=atan2(y,x);%az=atan(y./x);%az=az+(x<0)*pi; % 2nd & 3rd quad%az=az+(az<0)*2*pi; % 4th quadva=asin(z./d);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -