RMderiv: Gradient of a field

Description Usage Arguments Value References See Also Examples

View source: R/RMmodels.R

Description

RMderiv is a multivariate covariance model which models a field and its gradient.

For an isotropic covariance model varphi, the covariance C given by RMderiv equals

C_{11}(x,y) = \varphi(\| x - y\|)

C_{j1}(x,y) = -C_{1j}(x,y) = \partial \varphi(\|x - y\|) / \partial x

C_{i,j}(x,y) = \partial^2 \varphi(\|x - y\|) / \partial x \partial y

for i,j = 2,…, d where d is the dimension of the field.

Usage

1
RMderiv(phi, which, var, scale, Aniso, proj)

Arguments

phi

a univariate stationary covariance model (in 2 or 3 dimensions).

which

vector of integers. If not given all components are returned; otherwise the selected components are returned.

var,scale,Aniso,proj

optional arguments; same meaning for any RMmodel. If not passed, the above covariance function remains unmodified.

Value

RMderiv returns an object of class RMmodel.

References

See Also

RMcurlfree, RMdivfree, RMvector

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again

model <- RMderiv(RMgauss(), scale=4)
plot(model, dim=2)

x.seq <- y.seq <- seq(-10, 10, 0.4)
simulated <- RFsimulate(model=model, x=x.seq, y=y.seq)

plot(simulated)

RandomFields documentation built on Jan. 19, 2022, 1:06 a.m.