An expression is some combination of constants, variables, functions, and operators. For example:
A*COSD(X/10)+3.5*SIND(X/12)+C*EXP(-X)
Input is limited to 255 characters, so to have expressions
that are longer, use character variables to store its pieces and the
EVALUATE function to
evaluate the expression numerically. For example:
F1 = '2.5*COS(X/10)+3.5*SIN(X/12)+63.7*EXP(X/45)' F2 = '1.234567*MOD(X,100)+SIN(X/1000)*EXP(X/200)' F3 = '3.56789*X^2-2.34567*X+23.456' F = 'F1+F2+F3' Y = EVALUATE(F)
You can use the EXPAND
function to expand all the parts of a string. For example, with the above variable definitions,
=EXPAND(F) will display:
(2.5*COS(X/10)+3.5*SIN(X/12)+63.7*EXP(X/45))+(1.234567*MOD(X,100)+SIN(X/1000)*EXP(X/200))+(3.56789*X^2-2.34567*X+23.456)