https://github.com/cran/pracma
Tip revision: 9fdea5df822b16ff97fe3dfe8316fa643dbb466b authored by HwB on 20 July 2012, 00:00:00 UTC
version 1.1.6
version 1.1.6
Tip revision: 9fdea5d
subspace.R
##
## s u b s p a c e . r Test suite
##
orth <- pracma::orth
subspace <- pracma::subspace
is.null(orth(c()))
M <- matrix(1:12, 3, 4)
all.equal(orth(M),
matrix(c(-0.504533, -0.760776,
-0.574516, -0.057141,
-0.644497, 0.646495), 3, 2, byrow = TRUE),
tolerance = 1e-5)
H <- pracma::Hadamard(8)
A <- H[, 2:4]
B <- H[, 5:8]
all.equal(subspace(A, B), pi/2, tolerance = 1e-10)