Template for Writing
User 4 Functions in C-Plot
What is template.4.c?
is a fully functioning example for a C-Plot level 4 user function.
It uses C-Plot macros defined in p_funct.h which is included with C-Plot.
See ref1.4.c for an example.
The program contains four functions:
Michael S Kelley
setup(): Described in the C-Plot user manual
Described in the C-Plot user manual. User 4 functions are only
executed once, so the template iterates through the points (0 to npts).
myFunc(double x, double y):
The actual function goes here. The example simply doubles the
y value of the current C-Plot data.
A parameter loading function. This function is not necessary,
but may be useful. It reads the file template.dat
for the values of two arrays: P and C. Instructions for creating
and modifying a template file are included in template.dat