wgs84Ellipsoid
Reference ellipsoid for World Geodetic System of 1984
Description
E = wgs84Ellipsoid
creates a referenceEllipsoid
object for the World Geodetic System of 1984 (WGS84)
reference ellipsoid. By default, the lengths of the semimajor axis and semiminor axis are in
meters.
E = wgs84Ellipsoid(
creates a WGS84
reference ellipsoid with the length unit specified by
lengthUnit
)lengthUnit
.
Examples
Create WGS84 Reference Ellipsoid
Create a WGS84 reference ellipsoid. By default, the semimajor and semiminor axes are in meters.
wgs84 = wgs84Ellipsoid
wgs84 = referenceEllipsoid with defining properties: Code: 7030 Name: 'WGS 84' LengthUnit: 'meter' SemimajorAxis: 6378137 SemiminorAxis: 6356752.31424518 InverseFlattening: 298.257223563 Eccentricity: 0.0818191908426215 and additional properties: Flattening ThirdFlattening MeanRadius SurfaceArea Volume
Display the surface area in square meters.
wgs84.SurfaceArea
ans = 5.1007e+14
Create WGS84 Reference Ellipsoid with Specified Units
Create a WGS84 reference ellipsoid with a length unit of kilometers.
wgs84km = wgs84Ellipsoid("kilometer")
wgs84km = referenceEllipsoid with defining properties: Code: 7030 Name: 'WGS 84' LengthUnit: 'kilometer' SemimajorAxis: 6378.137 SemiminorAxis: 6356.75231424518 InverseFlattening: 298.257223563 Eccentricity: 0.0818191908426215 and additional properties: Flattening ThirdFlattening MeanRadius SurfaceArea Volume
Display the surface area in square kilometers.
wgs84km.SurfaceArea
ans = 5.1007e+08
Input Arguments
lengthUnit
— Length unit of measure
'meter'
(default) | string scalar | character vector
Length unit of measure, specified as a string scalar or character vector. You can
specify any length unit accepted by the validateLengthUnit
function.
Value | Unit Name |
---|---|
"m" , "meter" ,
"meters" , "metre" ,
"metres" | Meters |
"cm" , "centimeter" ,
"centimeters" , "centimetre" ,
"centimetres" | Centimeters |
"mm" , "millimeter" ,
"millimeters" , "millimetre" ,
"millimetres" | Millimeters |
"micron" , "microns" | Microns |
"km" , "kilometer" ,
"kilometers" , "kilometre" ,
"kilometers" | Kilometers |
"nm" , "naut mi" , "nautical
mile" , "nautical miles" | Nautical miles |
"ft" , "international ft" ,
"foot" , "international foot" ,
"feet" , "international feet" | Feet |
"in" , "inch" ,
"inches" | Inches |
"yd" , "yds" , "yard" ,
"yards" | Yards |
"mi" , "mile" ,
"miles" , "international mile" ,
"international miles" | Miles |
"sf" , "survey ft" , "US survey
ft" , "U.S. survey ft" , "survey
foot" , "US survey foot" , "U.S. survey
foot" , "survey feet" , "US survey
feet" , "U.S. survey feet" | U.S. survey feet |
"sm" , "survey mile" , "survey
miles" , "statute mile" , "statute
miles" , "US survey mile" , "US survey
miles" , "U.S. survey mile(s)" , "U.S.
survey miles" | U.S. survey miles (statute miles) |
"Clarke's foot" , "Clarkes foot" | Clarke's feet |
"German legal metre" , "German legal
meter" | German legal metres |
"Indian foot" | Indian feet |
Data Types: char
| string
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Setting the length unit of measure is not supported.
Version History
Introduced in R2012aR2021a: Generate C and C++ code using MATLAB Coder
The wgs84Ellipsoid
function supports code generation.
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érica Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)