
7.7 GRIDDING EXAMPLE 207
7 SPATIAL DATA
7.7 Gridding Example
MATLAB has, from the start, provided a biharmonic spline interpolation
method that was developed by Sandwell (1987). is gridding method is
particularly well suited for producing smooth surfaces from noisy data sets
with unevenly-distributed control points.
As an example, we use synthetic xyz data representing the vertical dis-
tance between the surface of an imaginary stratigraphic horizon that has
been displaced by a normal fault, and a reference surface. e foot wall
of the fault shows roughly horizontal strata, whereas the hanging wall is
characterized by the development of two large sedimentary basins. e xyz
data are irregularly distributed and so need to be interpolated onto a regu-
lar grid. e xyz data are stored as a three-column table in a le named
normalfault.txt.
4.3229698e+02 7.4641694e+01 9.7283620e-01
4.4610209e+02 7.2198697e+01 6.0655065e-01
4.5190255e+02 7.8713355e+01 1.4741054e+00
4.6617169e+02 8.7182410e+01 2.2842172e+00
4.6524362e+02 9.7361564e+01 1.1295175e-01
4.5526682e+02 1.1454397e+02 1.9007110e+00
4.2930233e+02 7.3175896e+01 3.3647807e+00
(cont'd)
e rst and second column contain the coordinates x (between 420 and
470 of an arbitrary spatial coordinate system) and
y (between 70 and 120),
while the third column contains the vertical
z values. e data are loaded
using
clear
data = load('normalfault.txt');
Initially, we wish to create an overview plot of the spatial distribution of the
control points. In order to label the points in the plot, numerical
z values of
the third column are converted into character string representations with a
maximum of two digits.
labels = num2str(data(:,3),2);
e 2D plot of our data is generated in two steps. Firstly, the data are dis-
played as empty circles by using the
plot command. Secondly, the data
are labeled by using the function
text(x,y,'string') which adds text
contained in
string to the xy locations. e value 1 is added to all x coor-
dinates in order to produce a small o set between the circles and the text.