| SimBiology® | ![]() |
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 0 |
| Access | Read/Write |
This example shows you 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, Multiplier, sbioaddtolibrary, sbioshowunits, sbiounit.
MATLAB® functions get and set.
![]() | Notes | Owner | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |