pm_getunits

Get information about all units in unit registry

Syntax

[units, conversions, expressions] = pm_getunits

Description

[units, conversions, expressions] = pm_getunits returns all units in the registry in a cell array , units. Their corresponding conversions and base expressions are returned in conversions and expressions, respectively. For fundamental units, the conversion is 1.0 and the base expression is the unit itself.

Examples

List all units currently defined in the registry:

pm_getunits

ans = 

    'm'
    'kg'
    's'
    'c'
    'K'
    'mol'
    'cm'
    'mm'
    'km'
    'um'
    'C'
    'Fh'
    'R'
    'in'
    'ft'
    'mi'
    'yd'
    'l'
    'gal'
    'igal'
    'g'
    'mg'
    'lbm'
    'oz'
    'slug'
    'N'
    'lbf'
    'dyn'
    'lb'
    'mN'
    'min'
    'hr'
    'ms'
    'us'
    'ns'
    'rad'
    'deg'
    'rev'
    'mph'
    'fpm'
    'fps'
    'rpm'
    'Hz'
    'kHz'
    'MHz'
    'GHz'
    'gee'
    'J'
    'Btu'
    'eV'
    'W'
    'HP'
    'V'
    'A'
    'F'
    'H'
    'Ohm'
    'S'
    'Wb'
    'T'
    'G'
    'mV'
    'kV'
    'pA'
    'nA'
    'uA'
    'mA'
    'kA'
    'pF'
    'nF'
    'uF'
    'uH'
    'mH'
    'kOhm'
    'MOhm'
    'GOhm'
    'nS'
    'uS'
    'mS'
    'Pa'
    'bar'
    'psi'
    'atm'
    'lpm'
    'gpm'
    'Poise'
    'cP'
    'reyn'
    'St'
    'cSt'
    'Newt'
Was this topic helpful?