Main Content

derivedUnits

Derived units of unit system

Description

example

derivedUnits(unitSystem) returns the derived units of the unit system unitSystem as a vector of symbolic units. You can use the returned units to create new unit systems by using newUnitSystem.

Examples

collapse all

Get the derived units of a unit system by using derivedUnits. Then, modify the derived units and create a new unit system using the modified derived units. Available unit systems include SI, CGS, and US. For all unit systems, see Unit Systems List.

Get the derived units of the SI unit system.

dunits = derivedUnits('SI')
dunits =
[ [F], [C], [S], [H], [V], [J], [N], [lx], [lm], [Wb], [W], [Pa],...
 [Ohm], [T], [Gy], [Bq], [Sv], [Hz], [kat], [rad], [sr], [Celsius]]

Note

Do not define a variable called derivedUnits because the variable will prevent access to the derivedUnits function.

Define derived units that use kilonewton for force and millibar for pressure by modifying dunits using subs.

u = symunit;
newUnits = subs(dunits,[u.N u.Pa],[u.kN u.mbar])
newUnits =
[ [F], [C], [S], [H], [V], [J], [kN], [lx], [lm], [Wb], [W], [mbar],...
 [Ohm], [T], [Gy], [Bq], [Sv], [Hz], [kat], [rad], [sr], [Celsius]]

Define the new unit system by using newUnitSystem. Keep the SI base units.

bunits = baseUnits('SI');
newUnitSystem('SI_kN_mbar',bunits,newUnits)
ans = 
    "SI_kN_mbar"

To convert between unit systems, see Unit Conversions and Unit Systems.

Input Arguments

collapse all

Name of the unit system, specified as a string or character vector.

Version History

Introduced in R2017b