Unit composition modifier
Note
The Offset
property is currently not supported.
The Offset
is the numerical value by which
the unit composition is modified from the base unit. For example, °Celsius
= (5/9)*(°Fahrenheit-32); Multiplier
is 5/9
and Offset
is -32
.
Applies to | Object: Unit |
Data type | double |
Data values | Real number. Default is |
Access | Read/write |
This example shows how to create a user-defined unit, add it to the user-defined library, and query the library.
Create a user-defined unit called celsius2
,
whose composition refers to fahrenheit
, Multiplier
property
is 9/5
, and Offset
property
is 32
.
unitObj = sbiounit('celsius2','fahrenheit',9/5,32);
Add the unit to the user-defined library.
sbioaddtolibrary(unitObj);
Query the Offset
property.
get(unitObj, 'Offset') ans = 32
Composition
, get
, Multiplier
, sbioaddtolibrary
, sbioshowunits
, sbiounit
, set