Schur Decomposition
Purpose
To show Schur Factorization
Ex
> library(Matrix) > set.seed(12345) > A <- Matrix(round(rnorm(5 * 5, sd = 100)), nrow = 5) > Sch.A <- Schur(A) > result <- ((Sch.A@Q) %*% Sch.A@T %*% t(Sch.A@Q)) > error <- result - A |
One norm and Frobenius Norm
> print(norm(error)) [1] 7.727152e-13 > print(norm(error, "F")) [1] 4.767028e-13 |
Learnt a new function in R
> all.equal(A, result) [1] TRUE |
all.equal(x,y) is a utility to compare R objects x and y testing near equality. If they are different, comparison is still made to some extent, and a report of the differences is returned.