powered by
Sample from the 2-ball in d-dimensions.
mgc.sims.2ball(n, d, r = 1, cov.scale = 0)
the number of samples.
the number of dimensions.
the radius of the 2-ball. Defaults to 1.
1
if desired, sample from 2-ball with error sigma. Defaults to NaN, which has no noise.
NaN
the points sampled from the ball, as a [n, d] array.
[n, d]
# NOT RUN { library(mgc) # sample 100 points from 3-d 2-ball with radius 2 X <- mgc.sims.2ball(100, 3, 2) # }
Run the code above in your browser using DataLab