forked from compTAG/r-tda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircleUnif.Rd
48 lines (36 loc) · 825 Bytes
/
circleUnif.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
\name{circleUnif}
\alias{circleUnif}
\title{
Uniform Sample From The Circle
}
\description{
The function \code{circleUnif} samples \code{n} points from the circle of radius \code{r}, uniformly with respect to the circumference length.
}
\usage{
circleUnif(n, r = 1)
}
\arguments{
\item{n}{
an integer specifying the number of points in the sample.
}
\item{r}{
a numeric variable specifying the radius of the circle. The default value is \code{1}.
}
}
\value{
\code{circleUnif} returns an \code{n} by 2 matrix of coordinates.
}
\author{
Fabrizio Lecci
}
\note{
Uniform sample from sphere of arbitrary dimension can be generated using \code{\link{sphereUnif}}.
}
\seealso{
\code{\link{sphereUnif}}, \code{\link{torusUnif}}
}
\examples{
X <- circleUnif(100)
plot(X)
}
\keyword{datagen}