| cir_coord_conv {sphunif} | R Documentation | 
Transforming between polar and Cartesian coordinates
Description
Transformation between a matrix Theta containing
M circular samples of size n on [0, 2\pi) and an array
X containing the associated Cartesian coordinates on
S^1:=\{{\bf x}\in R^2:||{\bf x}||=1\}.
Usage
Theta_to_X(Theta)
X_to_Theta(X)
Arguments
| Theta | a matrix of size  | 
| X | an array of size  | 
Value
-  Theta_to_X: the correspondingX.
-  X_to_Theta: the correspondingTheta.
Examples
# Sample
Theta <- r_unif_cir(n = 10, M = 2)
X <- r_unif_sph(n = 10, p = 2, M = 2)
# Check equality
sum(abs(X - Theta_to_X(X_to_Theta(X))))
sum(abs(Theta - X_to_Theta(Theta_to_X(Theta))))
[Package sphunif version 1.4.0 Index]