<< NL_F_Intersection2Lines NL_F: Function NL_F_KrigingPred >>

NARVAL >> NL_F: Function > NL_F_KrigingOrdinary

NL_F_KrigingOrdinary

Perform the ordinary kriging prediction on a 2D dataset.

Calling Sequence

[K,V] = NL_F_KrigingOrdinary(X,Y,Z,Gx,Gy,N)

Arguments

X :

x-coordinate of the measurements.

Y :

y-coordinate of the measurements.

Z :

Value of the measurements.

Gx :

x-coordinate of the predictions.

Gy :

y-coordinate of the predictions.

N :

Number of points used by SemiVariogramFit.

K :

kriging predictor vector.

V :

kriging standard error vector.

Description

NL_F_KrigingOrdinary performs the ordinary kriging prediction (WIKIPEDIA) on the 2D dataset described by measurement points of values Z located in X and Y. Predictions are computed at the coordinates Gx and Gy. N is used to find the best slope (semivariance versus distance with a least-squares regression line, with a positive slope and passing through zero). The outputs are the kriging predictor vector K (forecasting values at [Gx,Gy]) and their kriging standard error V.

Examples

//grid
mx=0;
Mx=6;
my=0;
My=6;
l=50;
c=50;
[gx,gy]=NL_F_GridXY(mx,Mx,my,My,l,c);//grid
x=[1,3,1,4,5];
y=[5,4,3,5,1];
z=[100,105,105,100,115];
ni=100;
[K,V] = NL_F_KrigingOrdinary(x,y,z,gx,gy,ni);//application of NL_F_KrigingOrdinary
Mx=matrix(gx,l,c);
My=matrix(gy,l,c);
Mk=matrix(K,l,c);
Mv=matrix(V,l,c);
NL_V_Colormap(Mk,Mx(:,1)',My(1,:),256);
f1=gcf();
f1.figure_name="Kriging Predictor";
NL_V_Colormap(Mv,Mx(:,1)',My(1,:),256);
f2=gcf();
f2.figure_name="Kriging Standard Error";

Dependency

NL_F_SemiVariogram, NL_F_SemiVariogramFit, NL_F_GammaMatrix, NL_F_ForecastXY, NL_F_ForecastLambda, NL_F_KrigingPred, NL_F_KrigingVar

Report an issue
<< NL_F_Intersection2Lines NL_F: Function NL_F_KrigingPred >>