DADiSP Worksheet Functions > A - E > DEFUNITS
Defines a new compound unit.
DEFUNITS("name", "expansion", "abbrev")
"name" |
- |
A string. The full name of the new units. |
"expansion" |
- |
Optional. A string, a mathematical expression equivalent to the expansion of the new units. Defaults to empty (none). |
"abbrev" |
- |
Optional. A string, the abbreviation of the new units. Defaults to name. |
1 if successful, else 0.
defunits("Webers", "V*s", "Wb")
defines a new compound unit Weber with the abbreviation of Wb. Any series with units of V*s will be reduced to Webers.
W1: 1..100;setvunits("V")
W2: integ(w1)
getvunits(w2)
getvunits now returns Webers.
The expansion and abbrev arguments are optional. Defining a unit without an expansion is similar to using SETHUNITS, SETVUNITS or SETZUNITS.
Use DELUNITS to remove a defined unit.