5.0

5.0 | 1 rating Rate this file 41 downloads (last 30 days) File Size: 6.44 KB File ID: #25948

variogramfit

by Wolfgang Schwanghart

 

25 Nov 2009 (Updated 23 Feb 2010)

Code covered by the BSD License  

fits different theoretical variograms to an experimental variogram

Download Now | Watch this File

File Information
Description

variogramfit performs a least squares fit of various theoretical variograms to an experimental, isotropic variogram. The user can choose between various bounded (e.g. spherical) and unbounded (e.g. exponential) models. A nugget variance can be modelled as well, but higher nested models are not supported.

The function works best with the function fminsearchbnd available on the FEX. You should download it from the File Exchange (File ID: #8277). If you don't have fminsearchbnd, variogramfit uses fminsearch. The problem with fminsearch is, that it might return negative variances or ranges.

Supported bounded models:
'blinear' -- bounded linear
'circular' -- circular model
'spherical' -- spherical model, =default
'pentaspherical' -- pentaspherical model

Supported unbounded functions :
'exponential' -- exponential model
'gaussian' -- gaussian variogram
'whittle' -- Whittle's elementary correlation (involves a modified Bessel function of the second kind).
'stable' -- stable models sensu Wackernagel 1995). Same as gaussian, but with different exponents. Supply the exponent alpha (<2) as an additional pn,pv-pair 'stablealpha',alpha (default = 1.5).
'matern' -- Matern model. Requires an additional pn,pv pair. 'nu',nu (shape parameter > 0, default = 1). Note that for particular values of nu the matern model reduces to other authorized variogram models. (nu = 0.5 : exponential model, nu = 1 : Whittles model, nu -> inf : Gaussian model)

References:
Wackernagel, H. (1995): Multivariate Geostatistics, Springer.
Webster, R., Oliver, M. (2001): Geostatistics for Environmental Scientists. Wiley & Sons.
Minsasny, B., McBratney, A. B. (2005): The Matérn function as general model for soil variograms. Geoderma, 3-4, 192-207.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
fminsearchbnd, Experimental (Semi-) Variogram

MATLAB release MATLAB 7.8 (R2009a)
Zip File Content  
Other Files license.txt,
variogramfit.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
13 Jul 2010 Christian

Great program Wolfgang, simplicity of use, great code commenting, everything I could have wanted...(and I didnt have to do it myself!)

Please login to add a comment or rating.
Updates
08 Feb 2010

The matern model was added as theoretical variogram.

23 Feb 2010

Seems I forgot to include the m file in the previous update. Here it is.

Tag Activity for this File
Tag Applied By Date/Time
variogram Wolfgang Schwanghart 25 Nov 2009 10:54:12
geostatistics Wolfgang Schwanghart 25 Nov 2009 10:54:12
spatial statistics Wolfgang Schwanghart 25 Nov 2009 10:54:12
statistics Wolfgang Schwanghart 25 Nov 2009 10:54:12
optimization Wolfgang Schwanghart 25 Nov 2009 10:54:12
kriging Wolfgang Schwanghart 25 Nov 2009 10:54:12
kriging Stuart Kozola 05 Feb 2010 10:09:43

Contact us at files@mathworks.com