1. Specifications of data locations

A point in mGstat can be multidimensional. Only the native Matlab implementations of geostatistical algorithm can handle this. GSTAT and GSLIB are restricted to 3D.

A point is given by a 1-row vector, where the number of columns defines the dimension. For example, the location of the three 1D-points (x1,x2,x3)= (1,5,10) is given by

>> pos=[1;5;10];
>> [ndata,ndim]=size(pos)

ndata =
     3

ndim =
     1

More than location can is specified by a matrix where each row defines one point, and the number of rows is the number of locations. For example, the tree 4 dimensional points, (2,2,4,8), (1,2,3,4), (6,6,2,2) is given by

>> pos=[2 2 4 8; 1 2 3 4; 6 6 2 2];
>> [ndata,ndim]=size(pos)

ndata =
     3

ndim =
     4

To transform locations in matrix shape is straightforward in Matlab.

x =[ 1     2     3
     1     2     3];

y =[ 4     4     4
     5     5     5];

can be converted to the format required by mGstat by

>> pos=[x(:) y(:)]
pos =
     1     4
     1     5
     2     4
     2     5
     3     4
     3     5

>> [ndata,ndim]=size(pos)
ndata =
     6

ndim =
     2