unitstr - Check spatiotemporal unit strings and abbreviations

Syntax

unitstr
str = unitstr(str0,'angles')
str = unitstr(str0,'distances')

unitstr, with no arguments, displays a list of strings and abbreviations, recognized by certain Mapping Toolbox™ functions, for units of angle and length/distance.

str = unitstr(str0,'angles') checks for valid angle unit strings or abbreviations. If a valid string or abbreviation is found, it is converted to a standardized, preset string. 'angles' can be abbreviated.

str = unitstr(str0,'distances') checks for valid length unit strings or abbreviations. If a valid string or abbreviation is found, it is converted to a standardized, preset string. 'distances' can be abbreviated. Note that input strings 'miles' and 'mi' are converted to 'statutemiles'; there is no way to specify international miles in the unitstr function.

Examples

This function recognizes and standardizes certain abbreviations:

str = unitstr('sm','distances')

str =
statutemiles

And any unique truncation:

str = unitstr('ra','angles')

str =
radians

See Also

unitsratio

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS