Learn R Programming

RandomFields (version 3.0.35)

RMangle: Anisotropy matrix given by angle

Description

RMangle delivers an anisotropy matrix for the argument Aniso in RMmodel in two dimensions. RMangle requires one two strechting values, passed by ratio or diag, and an angle. For angle $a$ and code{diag} equal to $(d_1, d_2)$ the anisotropy matrix $A$ is A = diag(d_1, d_2) %*% matrix(ncol=2, c(cos(a), sin(a), -sin(a), cos(a)))

Usage

RMangle(angle, ratio, diag)

Arguments

angle
angle a
ratio
equivalent to diag=c(1, 1/ratio)
diag
the diagonal components of the matrix

Value

See Also

RMtrafo, RMmodel

Examples

Run this code
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again

model <- RMexp(Aniso=RMangle(angle=pi/4, ratio=3))
plot(model, dim=2)

x <- seq(0, 2, if (interactive()) 0.05 else 1)
z <- RFsimulate(x, x, model=model)
plot(z)


FinalizeExample()

Run the code above in your browser using DataLab