Skip to content

Instantly share code, notes, and snippets.

@josombio
josombio / semivariogram.m
Last active December 24, 2015 22:19
Octave script to calculate the spatial semivariogram.
function [s lags ncp model]=semivariogram(pos,z,delta,varargin)
% Calculates an empirical spatial semivariogram
%
% SYNTAX:
% [s lags ncp]=semivariogram(pos,z,delta,varargin)
%
% INPUTS:
% Mandatory:
% - pos: (NxD) matrix containing the D dimensional position of the control points.
% - z: (Nx1) vector containing the observations at the control points.