R/spectralNorm.R

Defines functions spectralNorm

#
# vim:set ff=unix expandtab ts=2 sw=2:
spectralNorm=function(#a utility function to compute the spectral norm of a matrix
### This function computes the spectral norm of a matrix which is defined as the inverse of the minimum of absolute values of the eigenvalues.
m ##<<a (quadratic) matrix 
){

1/min(abs((eigen(m,only.values=TRUE))$values))
### The spectral norm of the matrix, a real number.
}

Try the SoilR package in your browser

Any scripts or data that you put into this service are public.

SoilR documentation built on May 4, 2017, 9:08 p.m.