Skip to content

minvert.m

Basic Information

  SYNTAX:  [matinv,minsig,numsig] = minvert(mat,tol,figure_num)

  PURPOSE:  Perform SVD generalized inverse of non-square or square matrix.

  INPUTS:
     mat = matrix to invert (can be square or non-square)
     tol = tolerance for inversion (retains singular values st sv/sv_max>tol)
        If tol>1, then interprets as # of singular values to keep,,
        and returns sig(tol)/max(sig)
     figure_num = specifies figure number of plotting desired (default=no plot)

  OUTPUTS:
     matinv = SVD generalized inverse of mat.
     minsig = minimum singular value retained divided by max singular value
     numsig = number of singular values retained

  RESTRICTIONS:
     None.

  METHOD:
     SVD generalized inverse. Adapted from IDL function minvert.pro.

Dependencies