Main Content

earthRadius

Mean radius of planet Earth

    Description

    R = earthRadius returns the scalar value 6,371,000, the mean radius of the Earth in meters.

    example

    R = earthRadius(lengthUnit) returns the mean radius of the Earth using the length unit specified by lengthUnit.

    example

    Examples

    collapse all

    View the mean radius of the Earth using the default units, meters.

    earthRadius
    ans = 
    6371000
    

    View the mean radius of the Earth, specifying the units as kilometers.

    earthRadius("km")
    ans = 
    6371
    

    Input Arguments

    collapse all

    Length unit of measure, specified as a string scalar or character vector. You can specify any length unit accepted by the validateLengthUnit function.

    ValueUnit 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

    Version History

    Introduced in R2010b