This routine allows for generation of a digitized single-variable curve
or two-variable plane from an arbitrary mathematical function in the form
of z=f(x,y), where z represents an array or a grid of function values to
be computed at NX and NY different points of x and y (equally spaced only)
from a user specified x and y space (XR and YR fields in the dialogue menu).
When entering the f(x,y), use letter X and Y to denote the independent
variables in the formula of FORTRAN conventions.
To compute a 1-D curve, you can use either X variable or Y variable, then
specify NX and XR or NY and YR accordingly, and results are written to the
file on dialogue field DF in a binary data format for X,Y PLOT. To compute
a 2-D plane, use both X and Y variables and the results are written in the
binary data format for CONTOUR PLOT.
Example: FZ = C0 + C1*EXP(-(X-C2)**2) + C3*COS(2*PI*X) + C4*SIN(4*PI*X)
Example: FZ = C1*EXP(-(X-C2)**2) + C3*COS(2*PI*Y)
where C0,C1,C2... are constants to be specified on dialogue fields C0,C1,
C2,... and a number of mathematical and physical constants are built in.
Max 5 lines (385 characters) can be entered for f(x,y) and they are case-
insensitive. After you have entered one line of f(x,y), the cursor will
be positioned at the beginning of the next input line.
Defined dialogue commands:
RETURN ................... Start computing the f(x,y) if given.
EXIT or CTRL/Z ........... Exit to the main menu.
HELP/PF2 ................. Invoke the on-line help.
REFRESH/PF1 .............. Refresh the dialogue menu.
DCL/PF4 .................. Spawn a system subprocess.
FORTRAN mathematical operators:
+ ==> Addition / ==> Division
- ==> Subtraction ** ==> Exponentiation
* ==> Multiplication () ==> Parentheses
The precedence of operators: () => ** => *,/ => +,-.
Some FORTRAN intrinsic functions:
SQRT(P1) = Square root SIN(P1) = Sine
EXP(P1) = Exponential (e) ASIN(P1) = Arc Sine
LOG(P1) = Natural Logarithm COS(P1) = Cosine
LOG10(P1)= Common Logarithm ACOS(P1) = Arc Cosine
TAN(P1) = Tangent SINH(P1) = Hyperbolic Sine
ATAN(P1) = Arc Tangent ABS(P1) = Absolute value(Real)
TANH(P1) = Hyperbolic Tangent IABS(P1) = Absolute value (Integer)
COSH(P1) = Hyperbolic Cosine MOD(P1,P2)=Remainder (P1-P2*(P1/P2))
INT(P1) = Truncation MAX(P1,P2,...)= Maximum among P1,P2,...
NINT(P1) = Nearest integer MIN(P1,P2,...)= Minimum among P1,P2,...
Note: All trigonometric functions demand the arguments in radians.
Built-in mathematical and physical constants:
PI = 3.1415926E+00 ----------- pi
DR = 1.7453292E-02 ----------- Degree to Radian Conversion
NA = 6.0220450E+23 ----------- Avogadro constant
KC = 1.3806620E-23 ----------- Boltzmann constant (J/K)
CC = 2.9979246E+10 ----------- Speed of light (cm/s)
EC = 1.6021892E-19 ----------- Charge of proton (Coulomb)
EA = 4.8032500E-10 ----------- Charge of proton (ESU)
BM = 9.2740780E-24 ----------- Bohr magneton (J)
HC = 6.6261760E-34 ----------- Planck constant (J s)
FC = 9.6484560E+04 ----------- Faraday constant (Coulomb/mole)