runif_in_annulus {uniformly} | R 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)
[Package uniformly version 0.5.0 Index]