Lengths and Angles
On a perfect sphere, the distance between points on the surface of the sphere can be represented by angles. For spherical models of the Earth, Moon, and other planetary bodies, Mapping Toolbox™ allows spherical distance conversion between common units of angles and length.
Functions
Angle Conversion
Convert Degrees and Radians
Convert Notations
degrees2dm |
将学位转换为学位 |
degrees2dms |
将学位转换为学位-seconds |
DM2Degrees |
Convert degrees-minutes to degrees |
dms2degrees |
Convert degrees-minutes-seconds to degrees |
Convert Degrees and Radians at Run-Time
toDegrees |
Convert angles to degrees |
托拉德人 |
Convert angles to radians |
源自数字 |
Convert angles from degrees |
fromRadians |
从弧度转换角度 |
Angle Wrapping
wrapTo180 |
包角的度(-180 180) |
wrapTo360 |
Wrap angle in degrees to [0 360] |
wrapToPi |
Wrap angle in radians to [−pi pi] |
wrapTo2Pi |
在弧度上缠绕到[0 2*pi] |
unwrapMultipart |
Unwrap angles with parts separated byNaN 值 |
Length Conversion
Spherical Distance Conversion Between Angles and Length
deg2km |
将球形距离从学位转换为公里 |
deg2nm |
Convert spherical distance from degrees to nautical miles |
deg2sm |
Convert spherical distance from degrees to statute miles |
km2deg |
Convert spherical distance from kilometers to degrees |
km2rad |
Convert spherical distance from kilometers to radians |
nm2deg |
Convert spherical distance from nautical miles to degrees |
nm2rad |
Convert spherical distance from nautical miles to radians |
rad2km |
Convert spherical distance from radians to kilometers |
rad2nm |
Convert spherical distance from radians to nautical miles |
rad2sm |
Convert spherical distance from radians to statute miles |
sm2deg |
Convert spherical distance from statute miles to degrees |
sm2rad |
Convert spherical distance from statute miles to radians |
Formatted Angles, Unit Validation, Unit Conversion Factors
str2angle |
将字符串转换为程度 |
angl2str |
Convert angles to character array |
map.geodesy.isDegree |
True if input matches'degree' and false if'radian' |
validateLengthUnit |
验证和标准化长度单元 |
unitsratio |
Conversion factor between units |
Topics
Angles
- Angle Representations and Angular Units
Use angles with Mapping Toolbox functions, convert between angle representations, and format angles as text.
Lengths
- Length and Distance Units
球体上的电弧长度和距离的线性测量使用与平面上的单元相同,例如脚,米,里程和公里。
Spherical Distance
- Distances on the Sphere
You can represent distances on the sphere using angles or linear arc lengths. - Relationship Between Points on Sphere
There are many ways to define the 2-D spatial relationship between two points on a perfect sphere, including azimuth, heading, spherical distance, linear distance, and range.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- AméricaLatina(Español)
- Canada(English)
- United States(English)
Europe
- Belgium(English)
- 丹麦(English)
- Deutschland(Deutsch)
- España(Español)
- Finland(English)
- 法国(Français)
- 爱尔兰(English)
- Italia(Italiano)
- Luxembourg(English)
- Netherlands(English)
- 挪威(English)
- Österreich(Deutsch)
- Portugal(English)
- Sweden(English)
- Switzerland
- United Kingdom(English)