oblateSpheroid
Oblate ellipsoid of revolution
Description
An oblateSpheroid
object encapsulates the interrelated
intrinsic properties of an oblate ellipsoid of revolution. An oblate spheroid is
symmetric about its polar axis and flattened at the poles, and includes the perfect
sphere as a special case.
Creation
You can create an oblateSpheroid
object, s
, by
entering:
s = oblateSpheroid;
Properties
SemimajorAxis
— Equatorial radius of spheroid
1 (default)  positive, finite scalar
Equatorial radius of spheroid, specified as a positive, finite scalar. The
value of SemimajorAxis
is expressed in meters.
When the SemimajorAxis
property is changed, the
SemiminorAxis
property scales as needed to preserve
the shape of the spheroid and the values of shaperelated properties
including InverseFlattening
and
Eccentricity
. The only way to change the
SemimajorAxis
property is to set it directly, using
dot notation.
Example: 6378137
Data Types: double
SemiminorAxis
— Distance from center of spheroid to pole
1 (default)  nonnegative, finite scalar
Distance from center of spheroid to pole, specified as a nonnegative,
finite scalar. The value of SemiminorAxis
is always
less than or equal to SemimajorAxis
, and is expressed
in meters.
When the SemiminorAxis
property is changed, the
SemimajorAxis
property remains unchanged, but the
shape of the spheroid changes, which is reflected in changes in the values
of InverseFlattening
,
Eccentricity
, and other shaperelated
properties.
Example: 6356752
Data Types: double
InverseFlattening
— Reciprocal of flattening
Inf
(default)  positive scalar in the range [1, Inf
]
Reciprocal of flattening, specified as positive scalar in the range [1,
Inf
].
The value of inverse flattening, 1/f, is calculated
using SemimajorAxis
value a and
SemiminorAxis
value b according
to 1/f =
a/(ab). A value 1/f of Inf
designates a perfect sphere. As 1/f approaches 1, the
reference spheroid approaches a flattened disk.
When the InverseFlattening
property is changed, other
shaperelated properties update, including
Eccentricity
. The SemimajorAxis
property remains unchanged, but the value of
SemiminorAxis
adjusts to reflect the new
shape.
Example: 300
Data Types: double
Eccentricity
— First eccentricity of spheroid
0 (default)  nonnegative scalar in the range [0, 1]
First eccentricity of the spheroid, specified as nonnegative scalar in the range [0, 1].
The value of eccentricity, ecc, is calculated using
SemimajorAxis
value a and
SemiminorAxis
value b according
to ecc =
sqrt
(a^{2}

b^{2})/a. A value ecc of 0 designates a perfect
sphere.
When the Eccentricity
property is changed, other
shaperelated properties update, including
InverseFlattening
. The
SemimajorAxis
property remains unchanged, but the
value of SemiminorAxis
adjusts to reflect the new
shape.
Example: 0.08
Data Types: double
Flattening
— Flattening of spheroid
nonnegative scalar in the range [0, 1]
This property is readonly.
Flattening of the spheroid, specified as nonnegative scalar in the range [0, 1].
The value of flattening, f, is calculated using
SemimajorAxis
value a and
SemiminorAxis
value b according
to f =
(ab)/a.
Data Types: double
ThirdFlattening
— Third flattening of spheroid
nonnegative scalar in the range [0, 1]
This property is readonly.
Third flattening of the spheroid, specified as nonnegative scalar in the range [0, 1].
The value of the third flattening, n, is calculated
using SemimajorAxis
value a and
SemiminorAxis
value b according
to n =
(ab)/(a+b).
Data Types: double
MeanRadius
— Mean radius of the spheroid
positive, finite scalar
This property is readonly.
Mean radius of the spheroid, specified as positive, finite scalar. The
MeanRadius
property is expressed in meters.
The mean radius of the spheroid, r, is calculated using
SemimajorAxis
value a and
SemiminorAxis
value b according
to r =
(2a+b)/3.
Data Types: double
SurfaceArea
— Surface area of the spheroid
positive, finite scalar
This property is readonly.
Surface area of the spheroid, specified as positive, finite scalar. The
SurfaceArea
property is expressed in square
meters.
Data Types: double
Volume
— Volume of the spheroid
positive, finite scalar
This property is readonly.
Volume of the spheroid, specified as positive, finite scalar. The
Volume
property is expressed in cubic
meters.
Data Types: double
Examples
Create GRS 80 Ellipsoid
Create a GRS 80 ellipsoid using the
oblateSpheroid
class.
Start with a unit sphere by default.
s = oblateSpheroid
s = oblateSpheroid with defining properties: SemimajorAxis: 1 SemiminorAxis: 1 InverseFlattening: Inf Eccentricity: 0 and additional properties: Flattening ThirdFlattening MeanRadius SurfaceArea Volume
Reset the semimajor axis to match the equatorial radius of the GRS 80 reference ellipsoid.
s.SemimajorAxis = 6378137
s = oblateSpheroid with defining properties: SemimajorAxis: 6378137 SemiminorAxis: 6378137 InverseFlattening: Inf Eccentricity: 0 and additional properties: Flattening ThirdFlattening MeanRadius SurfaceArea Volume
The result is a sphere with radius 6,378,137 meters.
Reset the inverse flattening to the standard value for GRS 80, resulting in an oblate spheroid with a semiminor axis consistent with the value, 6,356,752.3141, tabulated in DMA Technical Memorandum 8358.1, "Datums, Ellipsoids, Grids, and Grid Reference Systems."
s.InverseFlattening = 298.257222101
s = oblateSpheroid with defining properties: SemimajorAxis: 6378137 SemiminorAxis: 6356752.31414036 InverseFlattening: 298.257222101 Eccentricity: 0.0818191910428158 and additional properties: Flattening ThirdFlattening MeanRadius SurfaceArea Volume
Tips
When you define a spheroid in terms of semimajor and semiminor axes (rather than semimajor axis and inverse flattening, or semimajor axis and eccentricity), a small loss of precision in the last few digits of
Flattening
,Eccentricity
, andThirdFlattening
may occur. This is unavoidable, but does not affect the results of practical computation.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2012aR2021a: Generate C and C++ code using MATLAB Coder
The oblateSpheroid
function supports code generation.
See Also
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)