runif_in_annulus: Uniform sampling in an annulus

Description Usage Arguments Value Examples

View source: R/annulus.R

Description

Uniform sampling in an annulus (dimension 2).

Usage

1
runif_in_annulus(n, O, r1, r2)

Arguments

n

number of simulations

O

center of the annulus

r1

inner radius

r2

outer radius

Value

The simulations in a n times 2 matrix.

Examples

1
2
sims <- runif_in_annulus(100, c(0,0), 1, 2)
plot(sims, xlim = c(-2,2), ylim = c(-2,2), asp = 1, pch = 19)

stla/uniformly documentation built on Aug. 10, 2018, 7:03 a.m.