runif_in_pball | R Documentation |
Uniform sampling in a p-ball (arbitrary dimension).
runif_in_pball(n, d, p, r = 1)
n |
number of simulations |
d |
dimension |
p |
exponent in the p-norm, a positive number |
r |
positive number, the radius |
The simulations in a n
times d
matrix.
sims <- runif_in_pball(500, d = 2, p = 1)
plot(sims, xlim = c(-1, 1), ylim = c(-1, 1), asp = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.