Learn R Programming

spinifex (version 0.2.5)

is_orthonormal: Test if a numeric matrix is orthonormal.

Description

Handles more cases than tourr::is_orthonormal().

Usage

is_orthonormal(x, tol = 0.001)

Arguments

x

Numeric matrix to test the orthonormality of.

tol

Tolerance of (the sum of element-wise) floating point differences.

Value

Single logical of the orthonormal matrix of the matrix.

Examples

Run this code
# NOT RUN {
is_orthonormal(tourr::basis_random(n = 6))
is_orthonormal(matrix(1:12, ncol=2), tol = 0.01)
# }

Run the code above in your browser using DataLab