R/pseudoinverse.R

pseudoinverse <-
function (m, tol)
{
    msvd = fast.svd(m, tol)
    
    if (length(msvd$d) == 0)
    {
       return(
            array(0, dim(m)[2:1])
            )
    }
    else
    {
       return( 
            msvd$v %*% (1/msvd$d * t(msvd$u))
            )
     }    
}

Try the ARTIVA package in your browser

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

ARTIVA documentation built on May 1, 2019, 6:31 p.m.