pwAddF
m = pwAddF(m, ID, rhs, numberOfArguments)
PottersWheel supports user defined functions, which can be used within
the differential equations or the reaction rate signatures.
Description
The right hand side (rhs) may contain expressions 'arg1', 'arg2', etc.
to use the first, second, etc. argument. In addition, all dynamic
variables (x), dynamic paramters (k), rules (a), or inputs (u)
may be used.
Allowed mathematical functions within the right hand side
are all functions supported by math.h of the C language, e.g.
sin, cos, exp, log, and sqrt.
x^y will be replaced by pow(x, y).
x^2 will be replaced by x*x, etc.
Example
% Sum of two values
m = pwAddF(m, 'sum', 'arg1 + arg2', 2);
% Could be used within the reaction kinetics as
'r1 * sum(r2, r3)'