[new, grid] = avg_ascii2(files, x, y, grid, method )
This Matlab function calculates averages of data between different ascii columnar files. Each column specifies the values of a variable at different grid points.
Parameters x and y specify the columns to be used as x/y points. A common grid to all datasets is determined, and data are regridded onto this new grid. If grid is specified, it is taken as the new grid.
The interpolation method for regridding can be specified by method.
Since regridding is done by regrid2(3m), bad data along the regrid axes is allowed, and duplicate grid points on input will be averaged together.
Cell array of file names containing columnar ascii data to be averaged together. Files may also be a cell array of already processed data.
Column number to use for regridding data along a common x grid before averaging.
Column number to use for regridding data along a common y grid before averaging.
Grid on which data should be averaged (default is to build a default grid). It must be a cell array with 2 column vectors specifying the new grid points where x=grid{1} and y=grid{2}.
Method to use for regridding data (default is linear). See Matlab function griddata for more information.
Array with averaged data on the new grid.
The new grid points.
Pierre Jaccard, Geophysical Institute, University of Bergen, 1999