powered by
Generate a random orthogonal basis matrix of dimension \((n x d)\) using the method in Heiberger (1978).
randomOrthogonalMatrix(n, d)
the number of rows of the resulting orthogonal matrix.
the number of columns of the resulting orthogonal matrix.
An orthogonal matrix of dimension \(n x d\) such that each column is orthogonal to the other and has unit lenght.
Heiberger R. (1978) Generation of random orthogonal matrices. Journal of the Royal Statistical Society. Series C (Applied Statistics), 27(2), 199-206.
coordProj
# NOT RUN { B <- randomOrthogonalMatrix(10,3) zapsmall(crossprod(B)) # }
Run the code above in your browser using DataLab