Constructor - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Interpolation[Kriging]

  

Constructor

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Kriging(points, data)

Parameters

points

-

a list, Vector, listlist, Array, or Matrix containing the coordinates of the points corresponding to data values. If this is a listlist, each inner list must contain n entries, where n is the dimensionality of the data. If this is an Array or Matrix, then there must be n columns, with each row corresponding to one set of coordinates. If it is a plain list or a Vector, then the input points are 1-dimensional.

data

-

a list, Array, or Matrix containing the data, which must be arranged in the same order as the corresponding coordinates appear in points

Description

• 

The Kriging command returns a Kriging object. See this help page for a general mathematical description of the Kriging process.

• 

Input sample points must not contain duplicates. The presence of duplicate points can lead to unexpected results.

• 

The following help pages describe the Kriging object and its methods further:

apply Kriging at a grid of values

Constructor

display the empirical variogram

fit parameters of a variogram

Interpolate at a point

Overview

Set the variogram for a Kriging object

 

Examples

> 

with⁡Interpolation:

Specify some points and some data manually.

> 

points≔0,0,1,0,3,0,1,1,2,1,3,2,0,3,2,3

points≔0,0,1,0,3,0,1,1,2,1,3,2,0,3,2,3

(1)
> 

data≔7.9,7.7,11.4,2.2,3.0,5.7,1.4,4.6

data≔7.9,7.7,11.4,2.2,3.0,5.7,1.4,4.6

(2)

We can visualize these points and data values as follows.

> 

ptp≔plotspointplot3d⁡seq⁡op⁡pointsi,datai,i=1..nops⁡points:

> 

ptp

Create a Kriging object.

> 

k≔Kriging⁡points,data

k≔Krⅈgⅈng ⅈntⅇrpolatⅈon obȷⅇct wⅈth 8 samplⅇ poⅈntsVarⅈogram: Sphⅇrⅈcal(4.35,32.49,2.236067977)

(3)

This uses an estimate to set the variogram used. This is often useful if we do not have a model for the variogram, but if we do, we can set the variogram manually.

> 

SetVariogram⁡k,Spherical⁡1,40,4

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

(4)

If we evaluate k at one of the input points, we get the corresponding value back.

> 

k⁡3,0

11.4000000000000004

(5)

The value at other points is interpolated.

> 

k⁡2,0

7.96736181702214896

(6)

We can visualize the interpolated surface as follows; or we can include the data points, too.

> 

pk≔plot3d⁡k⁡x,y,x=0..3,y=0..3:

> 

pk

> 

plots:-display⁡ptp,pk

We can also find out what the modeled variance is at various points.

> 

k⁡3,0,output=variance

0.

(7)
> 

k⁡2,0,output=variance

14.8894610336107771

(8)

We can also display this variance, or use the variance to color the visualization of the interpolated surface.

> 

plot3d⁡k⁡x,y,output=variance,x=0..3,y=0..3

> 

pk2≔plot3d⁡k⁡x,y,x=0..3,y=0..3,color=k⁡x,y,output=variance25,0.8,0.8,colortype=HSV:

> 

plots:-display⁡ptp,pk2

Maple also contains functionality for generating data that is spatially correlated according to a given variogram.

> 

points,data≔KrigingGenerateSpatialData⁡Spherical⁡1,10,1

points,data≔0.8147236863931790.7060460880196090.9057919370756190.03183284637742070.1269868162935060.2769229849608900.9133758561390190.04617139063115390.6323592462254100.09713178123584750.09754040499940950.8234578283272930.2784982188670480.6948286229758170.5468815192049840.3170994800608610.9575068354342980.9502220488383550.9648885351992770.0344460805029088⋮⋮30 × 2 Matrix,−1.313178883098403.78399452938772−4.079067475567432.810336570210773.071599080823360.128958765233152−3.217372722382440.7072451657106540.08778773037919770.937296621856632⋮30 element Vector[column]

(9)

Create a Kriging object:

> 

k≔Kriging⁡points,data

k≔Krⅈgⅈng ⅈntⅇrpolatⅈon obȷⅇct wⅈth 30 samplⅇ poⅈntsVarⅈogram: Sphⅇrⅈcal(1.25259453854473,13.6487615617241,.5525536774)

(10)

Use the Kriging object to interpolate at a given point:

> 

k⁡0.2,0.3

−2.75173577049670470

(11)

Compatibility

• 

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

• 

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

See Also

Interpolating at a point

Kriging

SetVariogram