Offset - Unit composition modifier

Description

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.

Characteristics

Applies toObject: Unit
Data typedouble
Data values

Real number. Default is 0

AccessRead/Write

Examples

This example shows you how to create a user-defined unit, add it to the user-defined library, and query the library.

  1. 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); 
  2. Add the unit to the user-defined library.

    sbioaddtolibrary(unitObj);
    
  3. Query the Offset property.

    get(unitObj, 'Offset')
    
    ans =
    
    32

See Also

Composition, Multiplier, sbioaddtolibrary, sbioshowunits, sbiounit.

MATLAB® functions get and set.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS