Nothing
matrixpwr <-
function(A, power){
if (!is.numeric(power) || length(power) > 1 ||
!is.finite(power)) stop("power must be a single number")
if (!is.matrix(A)) stop("object not a matrix")
if (abs( nrow(A) - ncol(A) ) > 0 ) stop("matrix must be square")
if (power == 0) return(diag(1, nrow(A)))
if (power == 1) return(A)
if (power < 0 ) {
singtest <- "matrix" %in% class(try(solve(A),silent=TRUE))
if (!singtest) stop("matrix singular")
}
if (isSymmetric(unname(A))) {
with(eigen(A), vectors %*% (values^power * t(vectors)))
} else {
with(eigen(A), vectors %*% (values^power * solve(vectors)))
}
}
"%^%" <- function(A, power) matrixpwr(A, power)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.