/* nag_2d_spline_fit_grid(e02dcc) Example Program * * Copyright 1991 Numerical Algorithms Group. * * Mark 2, 1991. * * Mark 6 revised, 2000. */ #include #include #include #include #define MXMAX 11 #define MYMAX 9 #define NMAX 7 #define NXEST MXMAX + 4 #define NYEST MYMAX + 4 int main(void) { Integer mx, my, nx, ny, npx, npy, i, j; double f[MXMAX*MYMAX], x[MXMAX], y[MYMAX], fg[NMAX*NMAX], px[NMAX], py[NMAX]; double xhi, yhi, xlo, ylo, delta, s, fp; Nag_Start start; Nag_2dSpline spline; Nag_Comm warmstartinf; Vprintf("e02dcc Example Program Results\n"); Vscanf("%*[^\n]"); /* Skip heading in data file */ /* Input the number of x, y co-ordinates mx, my. */ Vscanf("%ld%ld",&mx,&my); if (mx>0 && mx<=MXMAX && my>0 && my<=MYMAX) { /* Input the x co-ordinates followed by the y co-ordinates. */ for (i=0; i=0; i--) { Vprintf("%7.2f ",py[i]); for (j=0; j