In C, the data points are:
#define NPOINTS 20 /* This is the number of data points*/
/* Here is a vector containing the x-values */
float x[NPOINTS]={0.0516082, 0.128727, 0.183212, 0.210909, 0.290406,
0.294732, 0.321201, 0.344, 0.363073, 0.43772, 0.500713, 0.50225,
0.565908, 0.571533, 0.72712, 0.770354, 0.835032, 0.845504, 0.850564,
0.964372};
/* Here is a vector containing the y-values */
float y[NPOINTS]={2.89574, 3.12705, 3.05028, 3.03999, 2.86911,
3.21711, 2.91052, 2.58598, 2.68829, 2.63369, 2.71827, 2.79343,
2.69613, 2.75923, 2.10584, 2.2825, 1.99966, 2.33427, 2.3399, 2.17499};
In FORTRAN, we can use DATA
statements to define the points:
INTEGER NPOINTS
PARAMETER (NPOINTS=20)
REAL X(NPOINTS), Y(NPOINTS)
C Here is a vector containing the x-values
DATA X/0.0516082, 0.128727, 0.183212, 0.210909, 0.290406,
& 0.294732, 0.321201, 0.344, 0.363073, 0.43772, 0.500713,
& 0.50225, 0.565908, 0.571533, 0.72712, 0.770354, 0.835032,
& 0.845504, 0.850564, 0.964372/
C Here is a vector containing the y-values
DATA Y/2.89574, 3.12705, 3.05028, 3.03999, 2.86911, 3.21711,
& 2.91052, 2.58598, 2.68829, 2.63369, 2.71827, 2.79343, 2.69613,
& 2.75923, 2.10584, 2.2825, 1.99966, 2.33427, 2.3399, 2.17499/
The DATA
statements must come after all of the declarations and
before any of the executable statements in a program.