Interpolation[Kriging] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Statistics and Data Analysis : Interpolation and Curve Fitting : Interpolation Package : Kriging Subpackage : Interpolation/Kriging/GenerateSpatialData

Interpolation[Kriging]

  

GenerateSpatialData

  

generate a spatially correlated data set

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

GenerateSpatialData(variogram)

GenerateSpatialData(variogram,n,options)

Parameters

variogram

-

a supported variogram model

n

-

(optional) the (approximate) number of points generated. The default value is 30.

options

-

(optional) keyword option of the form grid=truefalse or dimension=d. If grid is set to true, the generated data points will be equally spaced along each dimension (default: false). The dimension option sets the dimension of the points to be generated (default: 2).

Description

• 

The GenerateSpatialData command takes a variogram and generates a set of points and associated data reflective of that variogram model. These points and data can then be used to experiment with, or demonstrate, Kriging interpolation.

• 

If the grid=true option is given, then the points are located in a square d-dimensional grid, at coordinates equally spaced between 0 and 1. As a consequence, there will be kd points in total, for some k. Maple chooses k as n1d; consequently, the number of points generated may be smaller than n. For example, if d has its default value of 2, then the number of points will be reduced to the largest perfect square that is not greater than n.

• 

If the grid=true option is not given, then the points are uniformly randomly selected from the d-dimensional unit cube. In this case, exactly n points are generated.

• 

The data set is returned as an expression sequence of a list of lists representing the points, and a Vector of values at those points.

Examples

We generate some points in two dimensions and associated data.

points1,data1Interpolation:-Kriging:-GenerateSpatialDataSpherical1,10,1

points1,data10.8147236863931790.7060460880196090.9057919370756190.03183284637742070.1269868162935060.2769229849608900.9133758561390190.04617139063115390.6323592462254100.09713178123584750.09754040499940950.8234578283272930.2784982188670480.6948286229758170.5468815192049840.3170994800608610.9575068354342980.9502220488383550.9648885351992770.034446080502908830 × 2 Matrix,−1.313178883098443.78399452938756−4.079067475567692.810336570210603.071599080823370.128958765233181−3.217372722382490.7072451657106910.08778773037918310.93729662185697030 element Vector[column]

(1)

These can be used to demonstrate Kriging interpolation.

k1Interpolation:-Krigingpoints1,data1

k1Krⅈgⅈng ⅈntⅇrpolatⅈon obȷⅇct wⅈth 30 samplⅇ poⅈntsVarⅈogram: Sphⅇrⅈcal(1.25259453854485,13.6487615617233,.5525536774)

(2)

SetVariogramk1,Spherical1,10,1

Krⅈgⅈng ⅈntⅇrpolatⅈon obȷⅇct wⅈth 30 samplⅇ poⅈntsVarⅈogram: Sphⅇrⅈcal(1,10,1)

(3)

ComputeGridk1,0..1,0..1,0.1,output=plot

We now generate some points in a three-dimensional grid and associated data.

points2,data2Interpolation:-Kriging:-GenerateSpatialDataRationalQuadratic0.1,10,4,216,dimension=3,grid=true

points2,data20.0.0.0.2000000000000000.0.0.4000000000000000.0.0.6000000000000000.0.0.8000000000000000.0.1.0.0.1.0.2000000000000000.0.8000000000000000.2000000000000000.0.6000000000000000.2000000000000000.0.4000000000000000.2000000000000000.216 × 3 Matrix,−0.632614397974936−1.34308166072871−1.93300651069168−2.13152824723620−4.83822992869101−4.32045644058760−5.67818087381980−4.97533204086918−3.86641985393756−2.11822526262428216 element Vector[column]

(4)

k2Interpolation:-Krigingpoints2,data2

k2Krⅈgⅈng ⅈntⅇrpolatⅈon obȷⅇct wⅈth 216 samplⅇ poⅈntsVarⅈogram: Sphⅇrⅈcal(1.3774001758466,22.7123587826079,.8)

(5)

SetVariogramk2,RationalQuadratic0.1,10,4

Krⅈgⅈng ⅈntⅇrpolatⅈon obȷⅇct wⅈth 216 samplⅇ poⅈntsVarⅈogram: RatⅈonalQuaⅆratⅈc(.1,10,4)

(6)

plots:-implicitplot3dk2x,y,z=Statistics:-Mediandata2,x=0..1,y=0..1,z=0..1,grid=8,8,8

Compatibility

• 

The Interpolation[Kriging][GenerateSpatialData] command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

ComputeGrid

Kriging

SetVariogram