| MathSBML Home Page | MathSBML Site Map |
unitToSBML[options] returns an SBML <unitDefinition .../>
unitToSBML[{{options},{options},...}] returns a <listOfUnitDefinitions .../> where each option list corresponds to the options for single unitDefinition.
unitToSymbolicSBML[arguments] returns Symbolic XML for a <unitDefinition .../>.
New in version 2.1.5.; revised 2.4.13
|
|
unitToSBML[
id->"mmlh",
name->"millimoles_per_liter_per_hour",
unit-> {"mole"-> {scale-> -3},
"litre"-> {exponent-> -1},
"second"-> {multiplier->3600, exponent-> -1}}]
which means:
mmlh = (10-3 mole )×(litre-1)×( (3600 second)-1)
returns the string
<unitDefinition id="mmlh"
name="millimoles_per_liter_per_hour">
<listOfUnits>
<unit kind="mole"
scale="-3"/>
<unit kind="litre"
exponent="-1"/>
<unit kind="second"
exponent="-1"
multiplier="3600"/>
</listOfUnits>
</unitDefinition>
unitToSBML[
{ {id->"mmlh",name->"millimoles_per_liter_per_hour",
unit->{"mole"->{scale->-3},
"litre"->{exponent->->1},
"second"->{multiplier->3600,exponent->-1}}
},
{id->"fred",
unit->{"ampere"->{exponent->-1},
"ohm"->{scale->4}}
}
}]
returns
<listOfUnitDefinitions>
<unitDefinition id="mmlh"
name="millimoles_per_liter_per_hour">
<listOfUnits>
<unit kind="mole"
scale="-3"/>
<unit kind="litre"
exponent="-1"/>
<unit kind="second"
exponent="-1"
multiplier="3600"/>
</listOfUnits>
</unitDefinition>
<unitDefinition id="fred"
name="fred">
<listOfUnits>
<unit kind="ampere"
exponent="-1"/>
<unit kind="ohm"
scale="4"/>
</listOfUnits>
</unitDefinition>
</listOfUnitDefinitions>"
Go to the top of this page