[new, grid] = regrid2(data, x, y, grid, method )
This Matlab function removes lfirst ines that contain bad data along the specified x and y axes. It generates then x- andy-grid points from the input data, and averages duplicate values at identical grid points. If grid is not specified, x- and y-grids are generated from the x- and y-values in the input data. Data are then interpolated on the new grid points.
Input data do not need to be sorted and may contain bad values, or duplicate values at identical points.
Array containing two dimensional data in xyz-.
Column numbers specifying the x-axis.
Column numbers specifying the y-axis.
A cell array of two column vectors specifying the new grid points,where
x=grid{1},and y=grid{2}. If not present,a default regular
grid is
build,starting and ending at the same points as the given axes,and
with the same number of points.
The interpolation method to use for regridding data (default is linear). See Matlab help on function griddata for more information.
An Y*X*V mesh where the values of index v correspond to the
columns in
the input array.
A cell array with two column vectors containing the values of the new
grid points,where x=grid{1} and y=grid{2}.
Pierre Jaccard, Geophysical Institute, University of Bergen, 1999