Main Content

sbioshowunits

Show units in library

If you specify four output arguments when calling sbioshowunits, the function no longer returns the offset information as the fourth output. The fourth output is now a logical vector that is true for each built-in unit.

You can no longer specify five output arguments when you call sbioshowunits. For details, see Compatibility Considerations.

Syntax

unitObjs = sbioshowunits
[Name, Composition] = sbioshowunits
[Name, Composition, Multiplier] = sbioshowunits
[Name, Composition, Multiplier, Builtin] = sbioshowunits
[___] = sbioshowunits(UnitNames)

Arguments

unitObjs

Vector of unit objects from the BuiltInLibrary and UserDefinedLibrary properties of the Root.

UnitNames

Names of the built-in or user-defined units, specified as a character vector, string, string vector, or cell array of character vectors.

Composition

Shows the combination of base and derived units that defines the unit Name. For example, molarity is mole/liter.

Multiplier

The numerical value that defines the relationship between the unit Name and the base or derived unit as a product of the Multiplier and the base unit or derived unit. For example, 1 mole is 6.0221e23*molecule. The Multiplier is 6.0221e23.

BuiltinAn array of logical values. If Builtin is true for a unit, the unit is built in. If Builtin is false for a unit, the unit is user-defined.

Description

unitObjs = sbioshowunits returns the units in the library to unitObjs as a vector of unit objects.

[Name, Composition] = sbioshowunits returns the composition for each unit in Name to Composition as a cell array of character vectors.

[Name, Composition, Multiplier] = sbioshowunits returns the multiplier for the unit with name Name to Multiplier.

[Name, Composition, Multiplier, Builtin] = sbioshowunits returns whether the unit is built in or user defined for each unit in Name to Builtin.

[___] = sbioshowunits(UnitNames) returns information about the units matching any of the names specified in UnitNames.

Examples

[name, composition] = sbioshowunits;
[name, composition] = sbioshowunits('molecule');

Version History

Introduced in R2006a

expand all