Description Usage Arguments Details Author(s) Examples
This function generates random numbers from p-dimensional unit sphere.
1 | runifsphere(n, p = 2, seed = -1)
|
n |
number of random samples. |
p |
dimension of the unit sphere. |
seed |
seed for C++ random number generator. |
seed is passed to function std::srand(seed); Value -1 means that seed is not set in c++ code.
This function uses function randn() from Armadillo C++ Library.
Daniel Kosiorowski, Mateusz Bocian, Anna Wegrzynkiewicz and Zygmunt Zawadzki from Cracow University of Economics.
1 2 | x = runifsphere(n=100)
plot(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.