| MathSBML Home Page | MathSBML Site Map |
functionToSBML[options] returns a single SBML <functionDefinition.../>;
functionToSBML[{{options},{options},...}] returns an SBML <listOfFunctionDefinitions.../>;
functionToSymbolicSBML[arguments] returns Symbolic SBML for a single <functionDefinition.../>;
New in version 2.1.4. Revised in 2.6.0.
|
The following input expression (optional line-feeds added to emphasize syntactical nesting):
functionToSBML[id->alfafa,
arguments->{horse, grass},
math->(1/(horse*grass))]
will produce the following output:
<functionDefinition id="alfafa" name="alfafa"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <lambda> <bvar> <ci>horse</ci> </bvar> <bvar> <ci>grass</ci> </bvar> <apply> <times/> <cn type="integer">1</cn> <apply> <power/> <apply> <times/> <ci>grass</ci> <ci>horse</ci> </apply> <cn type="integer">-1</cn> </apply> </apply> </lambda> </math> </functionDefinition>
The following input expression (optional line-feeds added to emphasize syntactical nesting):
functionToSBML[
{ {id->QRT, arguments->{x}, math->x^(1/4)},
{id->sinc, arguments->{x}, math->Sin[x]/x}
}]
will produce the following output:
<listOfFunctionDefinitions> <functionDefinition id=\"QRT\" name=\"QRT\"> <math xmlns=\"http://www.w3.org/1998/Math/MathML\"> <lambda> <bvar> <ci>x</ci> </bvar> <apply> <power/> <ci>x</ci> <cn type=\"rational\">1<sep/>4</cn> </apply> </lambda> </math> </functionDefinition> <functionDefinition id=\"sinc\" name=\"sinc\"> <math xmlns=\"http://www.w3.org/1998/Math/MathML\"> <lambda> <bvar> <ci>x</ci> </bvar> <apply> <times/> <apply> <sin/> <ci>x</ci> </apply> <apply> <power/> <ci>x</ci> <cn type=\"integer\">-1</cn> </apply> </apply> </lambda> </math> </functionDefinition> </listOfFunctionDefinitions>