double *c_dsgrid2d(int, double , double , double , int, int, double , double , int *);
double *c_dsgrid2d(int n, double x, double y, double z, int nx, int ny, double xo, double yo, int *ier)
The number of input data points.
An array containing the X coordinates of the input data points.
An array containing the Y coordinates of the input data points.
An array of size n containing the functional values of the input data points. That is, z[m] is the value of the input function at coordinate (x[m],y[m]), for 0 <= m < n.
The number of X values in the output grid.
The number of Y values in the output grid.
An array of size nx containing the X coordinates of the output data grid. The values in xo must be increasing, but need not be equally spaced.
An array of size ny containing the Y coordinates of the output data grid. The values in yo must be increasing, but need not be equally spaced.
An error return value. If *ier is returned as 0, then no errors were detected. If *ier is non-zero, then refer to the man page for dsgrid_errors.
c_dsgrid2d returns a pointer to a linear array of data that is the interpolated grid stored in row-major order. That is, if out is declared as
and we set:
out = c_dsgrid2d(n, x, y, z, nx, ny, xo, yo, ier);
then out[i*ny+j] is the interpolated function value at coordinate point (xo[i],yo[j]) for 0 <= i < nx and 0 <= j < ny. The space for out is allocated internal to c_dsgrid2d and is nx*ny doubles in size.
To use c_dsgrid2d, load the NCAR Graphics library ngmath.
dsgrid, dsgrid_params, c_dsseti, c_dsgeti, c_dssetrd, c_dsgetrd, c_dssetc, c_dsgetc.
Complete documentation for Dsgrid is available at URL
Copyright (C) 2000
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.