Main Content

sbiounitprefix

Create user-defined unit prefix

Description

unitprefixObject = sbiounitprefix(prefixName) constructs a SimBiology® unit prefix object with the name prefixName.

In order to use the unit prefix defined by unitprefixObject , you must add it to the user-defined library using sbioaddtolibrary. Use sbioshowunitprefixes to list the units available in the user-defined library.

example

unitprefixObject = sbiounitprefix(prefixName,exponentValue) also specifies a multiplicative factor of 10^exponentValue.

example

unitprefixObject = sbiounitprefix(___,Name=Value) also sets the unitprefixObject properties using one or more name-value arguments, where Name is the object property name and Value is the corresponding value. For a list of the object properties, see UnitPrefix.

Examples

collapse all

Create a unit prefix peta with the exponent value of 15.

petaPrefix = sbiounitprefix("peta",15);

Add the unit prefix to the library.

sbioaddtolibrary(petaPrefix);

Check the library of unit prefixes. Note that peta has been added as a user-defined unit prefix.

sbioshowunitprefixes
ans = 
   SimBiology Unit Prefix Array

   Index:    Library:       Name:    Exponent:
   1         BuiltIn        centi    -2       
   2         BuiltIn        deci     -1       
   3         BuiltIn        deka     1        
   4         BuiltIn        femto    -15      
   5         BuiltIn        giga     9        
   6         BuiltIn        hecto    2        
   7         BuiltIn        kilo     3        
   8         BuiltIn        mega     6        
   9         BuiltIn        micro    -6       
   10        BuiltIn        milli    -3       
   11        BuiltIn        nano     -9       
   12        UserDefined    peta     15       
   13        BuiltIn        pico     -12      
   14        BuiltIn        tera     12       

Alternatively, you can use sbiowhos or the root object.

sbiowhos -userdefined -unitprefix
   SimBiology UserDefined Unit Prefixes
           
   Index:  Name:           Multiplier:              
   1       peta            1000000000000000         
rootObj = sbioroot;
rootObj.UserDefinedLibrary.UnitPrefixes
ans = 
   SimBiology Unit Prefix Array

   Index:    Library:       Name:    Exponent:
   1         UserDefined    peta     15       

Input Arguments

collapse all

Name of the unit prefix, specified as a character vector or string. Valid names must begin with a letter and be followed by letters, underscores, or numbers.

Data Types: char | string

Exponent value, specified as an integer. It shows the value of 10^exponentValue. For example, for the unit picomole, the exponentValue is -12.

Data Types: double

Output Arguments

collapse all

Unit prefix, returned as a UnitPrefix object.

Version History

Introduced in R2008a