Remove unit system



removeUnitSystem(unitSystem) removes the unit system unitSystem. You can remove only user-defined unit systems created with newUnitSystem. You cannot remove predefined unit systems listed in Unit Systems List.


collapse all

Define a unit system, use the unit system to rewrite units, and then remove the unit system by using removeUnitSystem.

Define the unit system mySystem with SI base units and the derived unit kilowatt hour.

u = symunit;
bunits = baseUnits('SI');
dunits = [u.kWh];
mySystem = newUnitSystem('mySystem',bunits,dunits)
mySystem = 

Convert 50,000 Joules to derived units of mySystem by using rewrite with the third argument 'Derived'. As expected, the result is in kilowatt hour.

ans =

Remove the unit system mySystem by using removeUnitSystem.


Converting units to mySystem now throws an error.

Input Arguments

collapse all

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

Introduced in R2017b