runif_in_annulus: Uniform sampling in an annulus

View source: R/annulus.R

runif_in_annulusR Documentation

Uniform sampling in an annulus

Description

Uniform sampling in an annulus (dimension 2).

Usage

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

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

uniformly documentation built on March 18, 2022, 6:44 p.m.