rorth: Generate A Random Orthonormal Matrix

Description Usage Arguments References Examples

View source: R/rorth.R

Description

Uniformly sample an orthornormal matrix from the collection of all possible orthonormal matrices of a certain size. The QR decomposition is used on a matrix containing Gaussian random numbers. The QR decomposition might not be the most efficient algorithm under some circumstances.

Usage

1
rorth(nrow, ncol, sd = 1)

Arguments

nrow

Integer giving the number of rows required.

ncol

Integer giving the number of columns required.

sd

The standard deviation passed to rnorm

References

Stewart, G. W. (1980). The efficient generation of random orthogonal matrices with an application to condition estimators. SIAM Journal on Numerical Analysis, 17(3), 403-409.

Examples

1
2
set.seed(1)
rorth(5, 2)

lsbclust documentation built on April 20, 2018, 1:03 a.m.